diff --git a/src/env_universal_common.rs b/src/env_universal_common.rs index 338fe9fd0..b241591d6 100644 --- a/src/env_universal_common.rs +++ b/src/env_universal_common.rs @@ -801,7 +801,7 @@ fn save(&mut self, directory: &wstr) -> bool { { let mut times: [libc::timespec; 2] = unsafe { std::mem::zeroed() }; times[0].tv_nsec = libc::UTIME_OMIT; // don't change ctime - if unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, &mut times[1]) } != 0 { + if unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, &mut times[1]) } == 0 { unsafe { libc::futimens(private_file.as_raw_fd(), ×[0]); }