]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Try (again) to fix test on Windows
authorSimonBrandhof <simon.brandhof@gmail.com>
Tue, 9 Apr 2013 13:19:57 +0000 (15:19 +0200)
committerSimonBrandhof <simon.brandhof@gmail.com>
Tue, 9 Apr 2013 13:19:57 +0000 (15:19 +0200)
sonar-runner-batch/src/main/java/org/sonar/runner/batch/FilePattern.java
sonar-runner-batch/src/test/java/org/sonar/runner/batch/FilePatternTest.java

index 6c4bebce0c7792928e56518a247d2a2722cae329..ec7e3393a71628bba4d30e78e5049fa421382fc9 100644 (file)
@@ -121,7 +121,7 @@ class FilePattern {
     }
 
     public boolean accept(File file) {
-      return pattern.match(file.getAbsolutePath());
+      return pattern.match(FilenameUtils.separatorsToUnix(file.getAbsolutePath()));
     }
 
     public boolean accept(File file, String filename) {
index 8237ee79fd510d89aefa66f092f37c87d838fddc..64a366da85b1648f48d029f2a0c8a9861581b71f 100644 (file)
@@ -76,7 +76,6 @@ public class FilePatternTest {
   }
 
   private String path(File f) throws IOException {
-    String s = FilenameUtils.separatorsToUnix(f.getCanonicalPath());
-    return StringUtils.removeEnd(s, "/");
+    return FilenameUtils.separatorsToUnix(f.getCanonicalPath());
   }
 }