"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
local: fix setting of btime on directories on Windows
Nick Craig-Wooda60da2ef388c
diff --git a/backend/local/setbtime_windows.go b/backend/local/setbtime_windows.goindex adb9efa3a..2a46f09eb 100644--- a/backend/local/setbtime_windows.go+++ b/backend/local/setbtime_windows.go@@ -4,7 +4,6 @@package localimport (- "os""syscall""time")@@ -13,7 +12,13 @@ const haveSetBTime = true// setBTime sets the birth time of the file passed infunc setBTime(name string, btime time.Time) (err error) {- h, err := syscall.Open(name, os.O_RDWR, 0755)+ pathp, err := syscall.UTF16PtrFromString(name)+ if err != nil {+ return err+ }+ h, err := syscall.CreateFile(pathp,+ syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil,+ syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0)if err != nil {return err}