Correctly duplicate files with numbers in filename #22907

Merged
merged 1 commit into from Mar 20, 2017

Conversation

Projects
None yet
4 participants
@wabirached
Contributor

wabirached commented Mar 20, 2017

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

Correctly duplicate files with numbers in filename by appending a ver…
…sion instead of incrementing the integer.
@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Mar 20, 2017

@wabirached, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bpasero and @egamma to be potential reviewers.

@wabirached, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bpasero and @egamma to be potential reviewers.

@msftclas

This comment has been minimized.

Show comment
Hide comment
@msftclas

msftclas Mar 20, 2017

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.
Thanks,
Microsoft Pull Request Bot

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.
Thanks,
Microsoft Pull Request Bot

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Mar 20, 2017

Member

@wabirached a filename called test.35.txt still ends up as test.36.txt when I copy it, can we improve it for that case as well?

Member

bpasero commented Mar 20, 2017

@wabirached a filename called test.35.txt still ends up as test.36.txt when I copy it, can we improve it for that case as well?

@wabirached

This comment has been minimized.

Show comment
Hide comment
@wabirached

wabirached Mar 20, 2017

Contributor

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.

Contributor

wabirached commented Mar 20, 2017

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.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Mar 20, 2017

Member

@wabirached of course, good point, I oversaw this.

Member

bpasero commented Mar 20, 2017

@wabirached of course, good point, I oversaw this.

@bpasero bpasero merged commit c484d0c into Microsoft:master Mar 20, 2017

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bpasero bpasero added this to the March 2017 milestone Mar 20, 2017

@wabirached wabirached deleted the wabirached:hotfix/correctly-duplicate-files-with-numbers-in-filename branch Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment