minor fix: keep library files when cleaning temporary files
This commit is contained in:
parent
7b763f0e75
commit
ba12b6ec00
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: ContikiMoteTypeDialog.java,v 1.55 2009/03/03 13:43:48 fros4943 Exp $
|
* $Id: ContikiMoteTypeDialog.java,v 1.56 2009/03/03 14:57:42 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.contikimote;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -2193,11 +2193,13 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
public static void cleanTempFiles() {
|
public static void cleanTempFiles() {
|
||||||
File objectDir = ContikiMoteType.tempOutputDirectory;
|
File objectDir = ContikiMoteType.tempOutputDirectory;
|
||||||
if (objectDir.exists() && objectDir.isDirectory()) {
|
if (objectDir.exists() && objectDir.isDirectory()) {
|
||||||
logger.info("Cleaning temporary files in: " + objectDir);
|
logger.info("Cleaning temporary files in: " + objectDir.getPath());
|
||||||
File[] objectFiles = objectDir.listFiles();
|
File[] objectFiles = objectDir.listFiles();
|
||||||
for (File objectFile : objectFiles) {
|
for (File objectFile : objectFiles) {
|
||||||
|
if (!objectFile.getName().endsWith(ContikiMoteType.librarySuffix)) {
|
||||||
objectFile.delete();
|
objectFile.delete();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
objectDir.delete();
|
objectDir.delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue