onedriver icon indicating copy to clipboard operation
onedriver copied to clipboard

Support symbolic links

Open jstaf opened this issue 4 years ago • 4 comments

Currently creating symbolic links returns ENOSYS.

jstaf avatar May 18 '20 19:05 jstaf

A preliminary investigation into things on the Graph APIs leads me to believe that that OneDrive doesn't actually support symbolic links at all, in which case ENOSYS is the right answer here.

Leaving this open for now in case things change, or I have a good idea for a workaround later.

jstaf avatar Jun 05 '20 22:06 jstaf

The issue is obviously a mismatch in between the posix filesystem features and the onedrive features.

Maybe in the future onedrive will support symlinks or some lookalike for them.

In the meantime may I advocate the introduction of an "emulate-posix" options that will let symlink be transformed to and from regular text files with a special syntax? This will be consistent to the way in which other programs store symlinks on system that do not support them. For instance consider git that has the option to represent symlinks as small text files containing the path linked to.

With the (non default) option enabled a local symbolic link such as file_a pointing to dir_b/file_c would be uploaded to onedrive as a file named file_a with content OneDrive filelink -> dir_b/file_c. On download, the onedrive client would recognize the special content of the file by matching the initial OneDrive filelink string (or whatever string is deemed appropriate) and create a file_a symlink pointing to dir_b/file_c.

callegar avatar Jun 01 '22 08:06 callegar

A workaround to the issue may be to use an nlinkfs fuse overlay on top of onedriver.

callegar avatar Jun 27 '22 12:06 callegar

@callegar That sounds like a good idea. @jstaf Have you considered implementing it?

FelixFourcolor avatar Oct 24 '23 05:10 FelixFourcolor