maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1075579 - /maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
Date Mon, 28 Feb 2011 23:15:19 GMT
Author: olamy
Date: Mon Feb 28 23:15:19 2011
New Revision: 1075579

URL: http://svn.apache.org/viewvc?rev=1075579&view=rev
Log:
take care of symlink

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java?rev=1075579&r1=1075578&r2=1075579&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
Mon Feb 28 23:15:19 2011
@@ -362,7 +362,11 @@ public class StarteamScmProvider
             throw new ScmException( fileOrDir.getPath() + " was not contained in " + basedir.getPath()
);
         }
 
-        return fileOrDir.getPath().substring( basedir.getPath().length() + 1, fileOrDir.getPath().length()
);
+        if ( basedir.getCanonicalFile().equals(basedir.getAbsoluteFile()) )
+        {
+            return fileOrDir.getPath().substring( basedir.getPath().length() + 1, fileOrDir.getPath().length()
);
+        }
+        return fileOrDir.getPath().substring( basedir.getCanonicalPath().length() + 1, fileOrDir.getPath().length()
);
     }
 
     private static File getAbsoluteFilePath( File fileOrDir )



Mime
View raw message