From 279f3e4934b01efaf930ba94b792a75db94e2ca5 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 15 Jun 2009 21:20:52 +0000 Subject: [PATCH] dont make the new dir unless we are going to move there --- core/java/src/net/i2p/util/WorkingDir.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/java/src/net/i2p/util/WorkingDir.java b/core/java/src/net/i2p/util/WorkingDir.java index 03ec21724..227a0c3be 100644 --- a/core/java/src/net/i2p/util/WorkingDir.java +++ b/core/java/src/net/i2p/util/WorkingDir.java @@ -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);