Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix directory timestamps #18

Open
rossica opened this issue Feb 19, 2023 · 0 comments
Open

Fix directory timestamps #18

rossica opened this issue Feb 19, 2023 · 0 comments

Comments

@rossica
Copy link
Collaborator

rossica commented Feb 19, 2023

The current file transfer model doesn't correctly set the timestamps on directories. What happens is the folder is created and the timestamp is set, but then files and directories are created under it, and those change the timestamp on the directory to the current day and time.
The solution here probably requires refactoring the way directory timestamps are set such that it happens AFTER the last file/directory is written to that directory.
Maybe have a std::stack where directories are added as they're received, and once all files have been received/written, pop the directories off the stack and correct the timestamps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant