mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 04:17:02 -05:00
Uses STAT_NSEC_INVALID in the portable interface instead of FILE_MTIME_NSEC_INVALID.
This commit is contained in:
parent
147b905495
commit
f2e6a0328a
6 changed files with 25 additions and 24 deletions
8
state.c
8
state.c
|
|
@ -1181,12 +1181,12 @@ static void state_read_text(struct snapraid_state* state, const char* path, STRE
|
|||
|
||||
/* ignore nanoseconds if asked to find by name */
|
||||
if (state->opt.force_by_name)
|
||||
v_mtime_nsec = FILE_MTIME_NSEC_INVALID;
|
||||
v_mtime_nsec = STAT_NSEC_INVALID;
|
||||
|
||||
c = sgetc(f);
|
||||
} else {
|
||||
/* use a special value, meaning that we don't have this information */
|
||||
v_mtime_nsec = FILE_MTIME_NSEC_INVALID;
|
||||
v_mtime_nsec = STAT_NSEC_INVALID;
|
||||
}
|
||||
|
||||
if (c != ' ') {
|
||||
|
|
@ -1822,7 +1822,7 @@ static void state_write_text(struct snapraid_state* state, STREAM* f)
|
|||
sputc(' ', f);
|
||||
sputu64(mtime_sec, f);
|
||||
hash = oathash64(hash, mtime_sec);
|
||||
if (mtime_nsec != FILE_MTIME_NSEC_INVALID) {
|
||||
if (mtime_nsec != STAT_NSEC_INVALID) {
|
||||
sputc('.', f);
|
||||
sputu32(mtime_nsec, f);
|
||||
hash = oathash32(hash, mtime_nsec);
|
||||
|
|
@ -2188,7 +2188,7 @@ static void state_read_binary(struct snapraid_state* state, const char* path, ST
|
|||
|
||||
/* ignore nanoseconds if asked to find by name */
|
||||
if (state->opt.force_by_name)
|
||||
v_mtime_nsec = FILE_MTIME_NSEC_INVALID;
|
||||
v_mtime_nsec = STAT_NSEC_INVALID;
|
||||
|
||||
ret = sgetb64(f, &v_inode);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue