Correctly duplicate files with numbers in filename#22907
Conversation
…sion instead of incrementing the integer.
|
This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request. |
|
@wabirached a filename called |
|
hey @bpasero, I thought that was the intended behaviour based on this comment: https://github.com/Microsoft/vscode/pull/22907/files#diff-9404b1da682862c61dce10b84ff76e5cR1101 This makes sense if a user is duplicating the file multiple times (test.txt -> test.1.txt -> test.2.txt -> etc). It's also the way it worked in previous builds (and it's consistent with how other products behave). Let me know what you think. |
|
@wabirached of course, good point, I oversaw this. |
This PR fixes an issue with duplicating files with numbers in the filename. It now correctly duplicates files with numbers in filename by appending a version instead of incrementing the integer.
Before:
Duplication of "1.js" gives "2.js".
Now:
Duplication of "1.js" gives "1.1.js"
Original issue: #22876