mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-03 06:23:16 +02:00
Update local folder creation timestamp with timestamp from OneDrive (#1934)
* When a new folder is created locally, use the lastModifiedDateTime as provided by OneDrive for the folders timestamp instead of the time when the client created the directory Note: This only will impact new folder that are created, will not touch or modify existing folders
This commit is contained in:
parent
f08039f511
commit
37bce6f82d
|
@ -2667,6 +2667,12 @@ final class SyncEngine
|
|||
// Configure the applicable permissions for the folder
|
||||
log.vdebug("Setting directory permissions for: ", path);
|
||||
path.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
||||
// Update the time of the folder to match the last modified time as is provided by OneDrive
|
||||
// If there are any files then downloaded into this folder, the last modified time will get
|
||||
// updated by the local Operating System with the latest timestamp - as this is normal operation
|
||||
// as the directory has been modified
|
||||
log.vdebug("Setting directory lastModifiedDateTime for: ", path , " to ", item.mtime);
|
||||
setTimes(path, item.mtime, item.mtime);
|
||||
}
|
||||
} catch (FileException e) {
|
||||
// display the error message
|
||||
|
|
Loading…
Reference in a new issue