Now we can delete a project even if it hasn't been saved to file yet.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@214 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
676a189968
commit
5c845f06bf
@ -309,14 +309,20 @@ public class ProjectManager implements Serializable {
|
||||
}
|
||||
|
||||
public boolean deleteProject(Project project) {
|
||||
File file = new File(_dir, project.id + ".project");
|
||||
if (file.exists()) {
|
||||
_projects.remove(project.id);
|
||||
_projectsMetadata.remove(project.id);
|
||||
boolean result = file.delete();
|
||||
save();
|
||||
return result;
|
||||
}
|
||||
return false;
|
||||
if (_projectsMetadata.containsKey(project.id)) {
|
||||
_projects.remove(project.id);
|
||||
_projectsMetadata.remove(project.id);
|
||||
|
||||
File file = new File(_dir, project.id + ".project");
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
|
||||
save();
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user