When deleting project dirs, we need to recurse into them ourselves.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@480 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
1d938bc4d0
commit
155b5a483a
@ -431,12 +431,24 @@ public class ProjectManager {
|
|||||||
|
|
||||||
File dir = getProjectDir(projectID);
|
File dir = getProjectDir(projectID);
|
||||||
if (dir.exists()) {
|
if (dir.exists()) {
|
||||||
dir.delete();
|
deleteDir(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveWorkspace();
|
saveWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static protected void deleteDir(File dir) {
|
||||||
|
for (File file : dir.listFiles()) {
|
||||||
|
if (file.isDirectory()) {
|
||||||
|
deleteDir(file);
|
||||||
|
} else {
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dir.delete();
|
||||||
|
}
|
||||||
|
|
||||||
protected void load() {
|
protected void load() {
|
||||||
if (loadFromFile(new File(_workspaceDir, "workspace.json"))) return;
|
if (loadFromFile(new File(_workspaceDir, "workspace.json"))) return;
|
||||||
if (loadFromFile(new File(_workspaceDir, "workspace.temp.json"))) return;
|
if (loadFromFile(new File(_workspaceDir, "workspace.temp.json"))) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user