Get the canonical path to our temporary directory

When we access ~/.gerritcodereview/tmp we might find out that tmp has
actually be symlinked to a different part of the local filesystem,
such as /tmp.  Resolve the link as early as possible during startup so
that if ~/ is on NFS we remove our dependency on the NFS server as
early as possible and won't be impacted later on should it go down.

Change-Id: Ib631add17338c08c55dd84762dc4fd105308d7c2
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce 2009-12-08 14:18:20 -08:00
parent 02fcda78fe
commit 46ade82099
1 changed files with 5 additions and 1 deletions

View File

@ -457,7 +457,11 @@ public final class GerritLauncher {
}
}
return tmp;
try {
return tmp.getCanonicalFile();
} catch (IOException e) {
return tmp;
}
}
private GerritLauncher() {