google / skicka

Command-line utility for working with Google Drive. Join the mailing list at https://groups.google.com/forum/#!forum/skicka-users.
Apache License 2.0
1.3k stars 118 forks source link

Downloaded file has incorrect modification time #82

Closed bgrainger closed 9 years ago

bgrainger commented 9 years ago

On Windows, a newly-downloaded file (created via skicka download /Remote C:\Local) has its modification time set to "now", rather than the modification time of the remote file.

Re-running skicka download syncs the metadata and corrects the local modification time.

The file should have the correct (remote) modification time after its initial download.

I suspect this occurs because defer writeCloser.Close() resets the modification time (to now) after os.Chtimes runs.