Browse Source

Support UNC filenames (\\server\path\file) on Windows platforms

PR: 131
Submitted by: wolf.siberski@tui.de


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267647 13f79535-47bb-0310-9956-ffa450edef68
master
Sam Ruby 25 years ago
parent
commit
9207ca8a59
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/main/org/apache/tools/ant/Project.java

+ 2
- 0
src/main/org/apache/tools/ant/Project.java View File

@@ -424,6 +424,8 @@ public class Project {
public File resolveFile(String fileName) { public File resolveFile(String fileName) {
// deal with absolute files // deal with absolute files
if (fileName.startsWith("/")) return new File( fileName ); if (fileName.startsWith("/")) return new File( fileName );
if (fileName.startsWith(System.getProperty("file.separator")))
return new File( fileName );


// Eliminate consecutive slashes after the drive spec // Eliminate consecutive slashes after the drive spec
if (fileName.length() >= 2 && if (fileName.length() >= 2 &&


Loading…
Cancel
Save