vscode-duplicate icon indicating copy to clipboard operation
vscode-duplicate copied to clipboard

Default Name Incorrect with multiple periods

Open mtom55 opened this issue 4 years ago • 1 comments

create a file called validate.test.js right click -> duplicate file or directory

expected ... default name is validate-copy.test.js or validate.test-copy.js actual: validate-copy.test (drops the .js extension)

mtom55 avatar Sep 30 '20 05:09 mtom55

To add to this (since it's really the same issue)... filenames with spaces, the change to adding -copy, and the option to not add extensions seem to further confuse the code. Ex. MyUserscript v2.1.user.js the duplicate is suggested to name: MyUserscript v2-copy.1.user

FWIW VSCode has a new(?) option ( "explorer.incrementalNaming": "smart" ) that if you copy MyUserscript v2.1.user.js and paste it in the same folder, the duplicate is named MyUserscript v2.2.user.js (it tries to auto increment if it spots a number pattern).

Obviously the above is a new feature, since this extension was last updated, but if this extension does get updated, maybe tapping into the new logic would save building some custom logic.

minig0d avatar Nov 16 '20 18:11 minig0d