mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 08:05:56 +00:00
Improved Windows/Unix detection (#631).
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3706 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
b3a4dae21a
commit
07bcb1a2f5
2 files changed
+4
-1
No files matched your search
@@ -158,6 +158,8 @@ public final class FilePath implements Serializable {
|
||||
* Checks if the remote path is Unix.
|
||||
*/
|
||||
private boolean isUnix() {
|
||||
// Windows absolute path always include ':', but this is not a valid char in Unix file systems.
|
||||
if(remote.contains(":")) return false;
|
||||
// Windows can handle '/' as a path separator but Unix can't,
|
||||
// so err on Unix side
|
||||
return remote.indexOf("\\")==-1;
|
||||
|
||||
Reference in new issue
Block a user