Skip to content

Commit dc4043b

Browse files
zilmTTmnencia
authored andcommitted
Fix wrong condition in getPathContents()
If the deletion and adding path share some characters the contains() function succeed and removes the added path. It should be checked if they are equal. This fixes some rename issues we discovered in our environment.
1 parent 4f76d48 commit dc4043b

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/hudson/plugins/scm_sync_configuration/model

1 file changed

+1
-1
lines changed

src/main/java/hudson/plugins/scm_sync_configuration/model/ChangeSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public Map<Path, byte[]> getPathContents(){
7575
for(Path pathToAdd : filteredPathContents.keySet()){
7676
for(Path pathToDelete : pathsToDelete){
7777
// Removing paths being both in pathsToDelete and pathContents
78-
if(pathToDelete.contains(pathToAdd)){
78+
if(pathToDelete.equals(pathToAdd)){
7979
filteredPaths.add(pathToAdd);
8080
}
8181
}

0 commit comments

Comments
 (0)