A further fix to paths applied.
fsRoot now represents the correct FS root.
relative path is used consistently then as a relative path to FS root.
This is a further fix of issue #35174 and a correction to the previous commit.
1.1 --- a/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java Wed Jul 30 13:52:16 2003 +0000
1.2 +++ b/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java Wed Jul 30 15:38:15 2003 +0000
1.3 @@ -511,9 +511,12 @@
1.4 psStr = Variables.expand(vars, psStr, true);
1.5 }
1.6 char ps = (psStr == null || psStr.length() < 1) ? java.io.File.pathSeparatorChar : psStr.charAt(0);
1.7 - String fsRoot = ((String) vars.get("ROOTDIR")) + ps + vars.get("MODULE");
1.8 + String relativeMountPoint = fileSystem.getRelativeMountPoint();
1.9 + String fsRoot = (String) vars.get("ROOTDIR");
1.10 + if (relativeMountPoint != null && relativeMountPoint.length() > 0) {
1.11 + fsRoot += ps + relativeMountPoint;//vars.get("MODULE");
1.12 + }
1.13 String relativePath = (String) vars.get("COMMON_PARENT");
1.14 - String relativeToFSRoot = null;
1.15 if ("".equals(vars.get("MULTIPLE_FILES")) && !"".equals(vars.get("FILE_IS_FOLDER"))) {
1.16 if (relativePath != null) {
1.17 relativePath = relativePath + "/" + (String) vars.get("PATH");
1.18 @@ -521,7 +524,6 @@
1.19 relativePath = (String) vars.get("PATH");
1.20 if (".".equals(relativePath)) relativePath = null;
1.21 }
1.22 - relativeToFSRoot = (String) vars.get("FILE");
1.23 }
1.24 if (relativePath != null) {
1.25 relativePath = relativePath.replace(File.separatorChar, '/');
1.26 @@ -533,7 +535,7 @@
1.27 wincat = createCatExec();
1.28 if (wincat == null) {
1.29 haveLocalCat = true;
1.30 - wincat = createLocalCatExecs(fsRoot, relativeToFSRoot);
1.31 + wincat = createLocalCatExecs(fsRoot, relativePath);
1.32 }
1.33 vars.put("WINCAT", wincat);
1.34 }
1.35 @@ -565,7 +567,7 @@
1.36 break;
1.37 }
1.38 String buffered = buff.toString();
1.39 - ArrayList filesCommited = getCommitedFiles(fsRoot, relativeToFSRoot, buffered, ps);
1.40 + ArrayList filesCommited = getCommitedFiles(fsRoot, relativePath, buffered, ps);
1.41 buffered = addMessageComment(vars, buffered);
1.42 vars.put("FILE_TEMPLATE", fileOutput(buffered));
1.43 // commit all remaining files if they can not be retrieved from the template
1.44 @@ -588,7 +590,7 @@
1.45 vars = new Hashtable(varsOriginal);
1.46 } while (filePaths.size() > 0);
1.47 //cpool.preprocessCommand(vce, vars);
1.48 - if (haveLocalCat && wincat != null) removeLocalCatExecs(fsRoot, relativeToFSRoot, wincat);
1.49 + if (haveLocalCat && wincat != null) removeLocalCatExecs(fsRoot, relativePath, wincat);
1.50 return true;
1.51 }
1.52