-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Description
As the title suggests, when in a library folder such as Documents, Music, Pictures, or Videos, shortcuts cannot be created of files nor folders.
The error message from the debug.log when trying to do so states:
2022-12-15 13:18:15.5286|WARN|CreateOrUpdateLinkAsync|The system cannot find the path specified. (0x80070003)
System.IO.DirectoryNotFoundException: The system cannot find the path specified. (0x80070003)
at System.Runtime.InteropServices.ComTypes.IPersistFile.Save(String pszFileName, Boolean fRemember)
at Vanara.Windows.Shell.ShellLink.SaveAs(String linkFile)
at Files.App.Helpers.FileOperationsHelpers.CreateOrUpdateLinkAsync(String linkSavePath, String targetPath, String arguments, String workingDirectory, Boolean runAsAdmin)
Steps To Reproduce
- Navigate to a library folder via the left side menu.
- Create a shortcut of the desired file or folder.
- Nothing happens
Steps to fix
I believe this may be due to the difference in the displayed path when in a library folder. That is, instead of the regular path one might expect, the path is:
C:\Users\Username\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms
My guess is that this pathname difference is in conflict with the current way of creating shortcuts and it cannot resolve the path to create the desired shortcut. Correctly resolving the path might fix the issue.
Files Version
Version: 2.4.1.0 OS Version: 10.0.19044.2364
Windows Version
Windows 10 21H2 19044.2364
Relevant Assets/Logs
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done