[FIXED JENKINS-11073] handle failure to set timestamp on Windows platforms more gracefully - this time hopefully for real

This commit is contained in:
Christoph Kutzinski committed 2011-11-23 20:28:51 +01:00
1 parent 8656049fb9
commit 8755e59c9a
3 files changed
+24 -5

No files matched your search

+2 -2
View File
@@ -291,7 +291,7 @@ public final class FilePath implements Serializable {
/**
* Checks if the remote path is Unix.
*/
private boolean isUnix() {
boolean isUnix() {
// if the path represents a local path, there' no need to guess.
if(!isRemote())
return File.pathSeparatorChar!=';';
@@ -1429,7 +1429,7 @@ public final class FilePath implements Serializable {
target.touch(lastModified());
} catch (IOException e) {
// On Windows this seems to fail often. See JENKINS-11073
if (!isUnix()) {
if (!target.isUnix()) {
LOGGER.warning("Failed to set timestamp on " + target.getRemote());
} else { // rethrow
throw new IOException2(e);