Skip to content
Snippets Groups Projects
Unverified Commit b9fc91e9 authored by BARBIER Marc's avatar BARBIER Marc
Browse files

fix broken project after deletion

parent 5c39c002
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,15 @@ public class Project implements Serializable{
{
this.items.remove(item);
File file = item.getFile();
if(file.exists()){
//we don't remove if the file is still used by other items
for(FileItem fileitem : items) {
if(fileitem.getFile().equals(file)) {
return;
}
}
file.delete();
System.err.println("Deleting file " + file.getAbsolutePath());
}
......@@ -68,4 +76,4 @@ public class Project implements Serializable{
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment