Qt doesnt have api for setting modtime, so we use utime().
Details
Details
- Reviewers
elvisangelaccio - Commits
- R36:b99bf9620f12: libzip: Preserve modtime when extracting
Extract a zip archive with libzip plugin and check that modtimes are restored for both files and folders.
Diff Detail
Diff Detail
- Repository
- R36 Ark
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Also restore mtime for directories. Since mtime for a dir gets updated when files/subfolders are added to it, we need to first save mtime for parentdir, then write the file/subfolder and finally restore the mtime for the parentdir.
plugins/libzipplugin/libzipplugin.cpp | ||
---|---|---|
555 | QFileInfo::lastModified() returns a QDateTime, but we need a time_t for the utime() call. |