Flow.Launcher icon indicating copy to clipboard operation
Flow.Launcher copied to clipboard

BUG: application does not support the current operation on symbolic links

Open ashish0kumar opened this issue 1 year ago • 3 comments

Checks

  • [X] I have checked that this issue has not already been reported.

  • [X] I am using the latest version of Flow Launcher.

Problem Description

Since, I symlinked the config of flow launcher to my dotfiles flow launcher config. This error is showing on startup: System.IO.IOException: This application does not support the current operation on symbolic links.

To Reproduce

  1. Symlink the flow launcher config
  2. Run flow launcher at startup

Screenshots

No response

Flow Launcher Version

1.19.2

Windows Build Number

10.0.22631.4169

Error Log

log file

ashish0kumar avatar Oct 05 '24 08:10 ashish0kumar

Yeah to provide atomicity of the file operation we do not support symbolic link to prevent potential data corruption.

taooceros avatar Oct 05 '24 17:10 taooceros

If more request to this we can consider switching to an embedded database rather than plain text.

taooceros avatar Oct 05 '24 17:10 taooceros

My programs plugin recursively tried to count symlinks in the start menu, which is why the log weighed 15 GB explorer_j9A7w0Dil0

bropines avatar Oct 08 '24 19:10 bropines

My programs plugin recursively tried to count symlinks in the start menu, which is why the log weighed 15 GB explorer_j9A7w0Dil0

huh that's a different issue. Could you fire another one? Also could you show some snippet inside the very large log that count symlink?

taooceros avatar Oct 29 '24 05:10 taooceros

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh

github-actions[bot] avatar Dec 29 '24 02:12 github-actions[bot]

This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.

github-actions[bot] avatar Jan 06 '25 02:01 github-actions[bot]

@taooceros Wouldn't this be trivial to solve by simply first resolving the path, then call ReplaceFile()?

helmesjo avatar Jan 09 '25 18:01 helmesjo

@taooceros Wouldn't this be trivial to solve by simply first resolving the path, then call ReplaceFile()?

I guess it makes sense? I am not quite familiar with symlink.

Are you proposing we resolve the final path and then replace the final file instead of the symlink?

taooceros avatar Jan 09 '25 18:01 taooceros

Are you proposing we resolve the final path and then replace the final file instead of the symlink?

Correct. If the problem is a path that includes one or more symlinks being passed to one of the functions, it should work to just first resolve it (that is, the resolved path no longer contains any symlink(s), it'll just be a simple absolute path) and then invoke the function. I don't use C# but just intuitively I would guess that should work.

helmesjo avatar Jan 09 '25 18:01 helmesjo

My programs plugin recursively tried to count symlinks in the start menu, which is why the log weighed 15 GB explorer_j9A7w0Dil0

huh that's a different issue. Could you fire another one? Also could you show some snippet inside the very large log that count symlink?

Ouch.... I didn't see the notification. I can try to repeat that bug. It's done in a couple of minutes.

bropines avatar Jan 10 '25 06:01 bropines

@ashish0kumar try this build? https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/builds/51303267/artifacts

taooceros avatar Jan 10 '25 19:01 taooceros

@taooceros I tested the build, and I'm now able to symlink files without any issues. Thanks for the fix!

ashish0kumar avatar Jan 15 '25 08:01 ashish0kumar