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:
@@ -457,8 +457,12 @@ public final class GerritLauncher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return tmp.getCanonicalFile();
|
||||||
|
} catch (IOException e) {
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private GerritLauncher() {
|
private GerritLauncher() {
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user