all: Support syncing ownership (fixes #1329) (#8434)

This adds support for syncing ownership on Unixes and on Windows. The
scanner always picks up ownership information, but it is not applied
unless the new folder option "Sync Ownership" is set.

Ownership data is stored in a new FileInfo field called "platform data". This
is intended to hold further platform-specific data in the future
(specifically, extended attributes), which is why the whole design is a
bit overkill for just ownership.
This commit is contained in:
Jakob Borg
2022-07-26 08:24:58 +02:00
committed by GitHub
parent 34a5f087c8
commit adce6fa473
35 changed files with 1896 additions and 500 deletions
-8
View File
@@ -129,14 +129,6 @@ func (f *BasicFilesystem) Chmod(name string, mode FileMode) error {
return os.Chmod(name, os.FileMode(mode))
}
func (f *BasicFilesystem) Lchown(name string, uid, gid int) error {
name, err := f.rooted(name)
if err != nil {
return err
}
return os.Lchown(name, uid, gid)
}
func (f *BasicFilesystem) Chtimes(name string, atime time.Time, mtime time.Time) error {
name, err := f.rooted(name)
if err != nil {