|
|
@@ -432,9 +432,11 @@ public class Symlink extends DispatchTask { |
|
|
FILE_UTILS.removeLeadingPath(canfil, linkfil)); |
|
|
FILE_UTILS.removeLeadingPath(canfil, linkfil)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolean renamedTarget = false; |
|
|
try { |
|
|
try { |
|
|
try { |
|
|
try { |
|
|
FILE_UTILS.rename(canfil, temp); |
|
|
FILE_UTILS.rename(canfil, temp); |
|
|
|
|
|
renamedTarget = true; |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
throw new IOException( |
|
|
throw new IOException( |
|
|
"Couldn't rename resource when attempting to delete " |
|
|
"Couldn't rename resource when attempting to delete " |
|
|
@@ -446,6 +448,7 @@ public class Symlink extends DispatchTask { |
|
|
+ " (was it a real file? is this not a UNIX system?)"); |
|
|
+ " (was it a real file? is this not a UNIX system?)"); |
|
|
} |
|
|
} |
|
|
} finally { |
|
|
} finally { |
|
|
|
|
|
if (renamedTarget) { |
|
|
// return the resource to its original name: |
|
|
// return the resource to its original name: |
|
|
try { |
|
|
try { |
|
|
FILE_UTILS.rename(temp, canfil); |
|
|
FILE_UTILS.rename(temp, canfil); |
|
|
@@ -455,6 +458,7 @@ public class Symlink extends DispatchTask { |
|
|
+ "\n THE RESOURCE'S NAME ON DISK HAS " |
|
|
+ "\n THE RESOURCE'S NAME ON DISK HAS " |
|
|
+ "BEEN CHANGED BY THIS ERROR!\n"); |
|
|
+ "BEEN CHANGED BY THIS ERROR!\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|