rmyorston / busybox-w32

WIN32 native port of BusyBox.
https://frippery.org/busybox
Other
670 stars 124 forks source link

ls causes OneDrive to download files from server #414

Closed Peter0x44 closed 3 months ago

Peter0x44 commented 3 months ago

Currently, running ls in a onedrive directory will cause all files within it to be downloaded if they are not "synced" already. MSYS2 seems to have a related issue here: https://github.com/msys2/MSYS2-packages/issues/3049

I'm not sure if this can be fixed, or if it's worth the effort to do so, but I figured I'd open this issue to get some discussion going.

rmyorston commented 3 months ago

Most likely it's because busybox-w32 looks inside many files to see if they're executable. It checks for shebang and executables that don't have the standard extensions. There may be other prodding of files it does that has the same effect.

Any fix would probably result in reduced functionality.

rmyorston commented 3 months ago

I've applied a quick fix to avoid downloading offline files in certain common cases. With this change ordinary use of ls, stat and find didn't result in any downloads in my limited testing. YMMV.

Try the latest prerelease binaries (PRE-5341 or above).

Peter0x44 commented 3 months ago

@rmyorston This worked for my case, thanks!