Skip to content

Commit ff58aeb

Browse files
committed
fix time compilation on windows msvc
1 parent ca3c995 commit ff58aeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rman_mount.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ struct Main {
182182
for (auto const &p : paths) {
183183
auto const name = p.filename().replace_extension("").generic_string() + '/';
184184
auto const time_file = fs::last_write_time(p);
185+
#ifdef _MSC_VER
186+
auto const time_sys = decltype(time_file)::clock::to_utc(time_file).time_since_epoch();
187+
#else
185188
auto const time_sys = decltype(time_file)::clock::to_sys(time_file).time_since_epoch();
189+
#endif
186190
auto const time_sec = std::chrono::duration_cast<std::chrono::seconds>(time_sys).count();
187191
auto bundle_status = RFile::read_file(p, [&, this](RFile &rfile) {
188192
if (this->cli.with_prefix) {

0 commit comments

Comments
 (0)