Skip to content

Commit

Permalink
SVNKIT-691: SVNDiffClient#doPatch didn't work correctly on Windows, n…
Browse files Browse the repository at this point in the history
…ow fixed.

The problem was in the "SvnPatchTarget.isUnderRoot()" method:
"workingCopyDirectoryPath" var contains forward slashes
while the "canonicalFullPath" contains backslashes - therefore the check
always returned false.

Patch by Martin Ehrnhoefer.
  • Loading branch information
dmitrypavlenko committed Jan 11, 2017
1 parent 98074e0 commit 07858f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ private static boolean isUnderRoot(File workingCopyDirectory, File relPath) thro
File fullPath = SVNFileUtil.createFilePath(workingCopyDirectory, relPath);
try {
String workingCopyDirectoryPath = SVNFileUtil.getFilePath(workingCopyDirectory.getCanonicalFile());
String canonicalFullPath = fullPath.getCanonicalPath();
String canonicalFullPath = SVNFileUtil.getFilePath(fullPath.getCanonicalFile());
return canonicalFullPath.equals(workingCopyDirectoryPath) || SVNPathUtil.isAncestor(workingCopyDirectoryPath, canonicalFullPath);
} catch (IOException e) {
SVNErrorMessage errorMessage = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e);
Expand Down

0 comments on commit 07858f7

Please sign in to comment.