dont make the new dir unless we are going to move there

This commit is contained in:
zzz
2009-06-15 21:20:52 +00:00
parent bdd75793bc
commit 279f3e4934

View File

@ -93,11 +93,6 @@ public class WorkingDir {
System.err.println("Wanted to use " + rv + " for a working directory but it is not a directory");
return cwd;
}
if (!dirf.mkdir()) {
System.err.println("Wanted to use " + rv + " for a working directory but could not create it");
return cwd;
}
// Check for a router.keys file or logs dir, if either exists it's an old install,
// and only migrate the data files if told to do so
// (router.keys could be deleted later by a killkeys())
@ -112,6 +107,11 @@ public class WorkingDir {
return cwd;
boolean migrateOldData = false; // this is a terrible idea
if (!dirf.mkdir()) {
System.err.println("Wanted to use " + rv + " for a working directory but could not create it");
return cwd;
}
// Do the copying
if (migrateOldData)
System.err.println("Migrating data files to new user directory " + rv);