onedriver
onedriver copied to clipboard
Support symbolic links
Currently creating symbolic links returns ENOSYS.
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.
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.
A workaround to the issue may be to use an nlinkfs fuse overlay on top of onedriver.
@callegar That sounds like a good idea. @jstaf Have you considered implementing it?