dont make the new dir unless we are going to move there
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user