public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ls/stat on OneDrive causes download of files
@ 2024-03-06  0:54 Marcin Wisnicki
  2024-03-06 13:22 ` Corinna Vinschen
  0 siblings, 1 reply; 17+ messages in thread
From: Marcin Wisnicki @ 2024-03-06  0:54 UTC (permalink / raw)
  To: cygwin

If I invoke ls or anything else that does stat inside OneDrive folder
it will trigger download of all files.

OneDrive uses placeholder files[1] to represent remote files.

I'm guessing reading file content in stat is to support detection of
actually executable files as in here[2]?

I think this should be disabled on non-hydrated placeholder files.
Running `find` or 'ls -R` and having your entire OneDrive downloaded
is extremely problematic.

I could live without executable scripts in the OneDrive folder and
it's easy to mark files as always offline to solve it.

Another idea is to skip checking files with extensions known to be
non-executable such as jpg (or just any extensions that is not known
to be executable).

This was previously reported in
https://github.com/msys2/msys2-runtime/issues/206.

[1] https://learn.microsoft.com/en-us/windows/win32/w8cookbook/placeholder-files
[2] https://github.com/msys2/msys2-runtime/blob/msys2-3.4.10/winsup/cygwin/fhandler/disk_file.cc#L548

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-03-11 17:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06  0:54 ls/stat on OneDrive causes download of files Marcin Wisnicki
2024-03-06 13:22 ` Corinna Vinschen
2024-03-06 13:28   ` Corinna Vinschen
2024-03-06 13:54     ` Brian Inglis
2024-03-06 17:19       ` Corinna Vinschen
2024-03-06 18:55         ` Jeffrey Altman
2024-03-06 19:14           ` Corinna Vinschen
2024-03-07  9:06           ` Corinna Vinschen
2024-03-08 10:37           ` Corinna Vinschen
2024-03-08 12:52             ` Thomas Wolff
2024-03-08 13:15               ` Jeffrey Altman
2024-03-08 13:56                 ` Corinna Vinschen
2024-03-08 22:21                   ` Corinna Vinschen
2024-03-08 22:26                     ` Marcin Wisnicki
2024-03-09 20:29                       ` Marcin Wisnicki
2024-03-11 17:04                         ` Corinna Vinschen
2024-03-06 19:00         ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).