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

Duplicate creates file in wrong folder

Open goldrik opened this issue 1 year ago • 2 comments

When duplicating a file which is not in any of the workspace folder, the command does not create the file in the chosen folder.

To reproduce:

  1. Start VS Code and have a folder in the workspace.
  2. Open a file in the editor which is not in that workspace
  3. File Utils: Duplicate
  4. Select a workspace folder
  5. The autogenerated path in the text box does not correspond to the same path selected in step 4

It should create the file in the selected workspace folder.

Note: It may be a nice addition to have the folder that file is located in be one of the options when selecting a workspace folder to duplicate the file into.

VS Code v1.86.1 Windows Server 2022 FileUtils v3.10.3

goldrik avatar Feb 14 '24 22:02 goldrik

same here, it always create the file relative to the workspace, while it should use the path as absolute.

ctf0 avatar Dec 05 '24 05:12 ctf0

i found the reason, u need to set both

  • "fileutils.duplicateFile.typeahead.enabled": false
  • "fileutils.inputBox.pathType": "root"

now when duplicating a file, it will be created in the correct path instead of relative to the workspace

ctf0 avatar Dec 25 '24 05:12 ctf0