Open optyfr opened 7 months ago
suppose I have 2 entries :
abcd.tmp
abcd.tmp0
If I rename abcd.tmp to bcde.tmp, then abcd.tmp0 is also renamed to bcde.tmp0 !!!
bcde.tmp
bcde.tmp0
This is probably related to this line : https://github.com/srikanth-lingala/zip4j/blob/c4c993cb143db99832eadd03699bd8228a9793b8/src/main/java/net/lingala/zip4j/tasks/RenameFilesTask.java#L128
Every file headers that starts with the file to rename are matching, and so they get renamed by overwritting with the new name up to the len of the new name
Replacing startsWith method with equals should solve the problem
suppose I have 2 entries :
abcd.tmp
abcd.tmp0
If I rename
abcd.tmp
tobcde.tmp
, thenabcd.tmp0
is also renamed tobcde.tmp0
!!!This is probably related to this line : https://github.com/srikanth-lingala/zip4j/blob/c4c993cb143db99832eadd03699bd8228a9793b8/src/main/java/net/lingala/zip4j/tasks/RenameFilesTask.java#L128
Every file headers that starts with the file to rename are matching, and so they get renamed by overwritting with the new name up to the len of the new name
Replacing startsWith method with equals should solve the problem