struct inclusion_exclusion *inex;
int ninex;
int crossfs;
+ int usemtime;
int fakeatimes;
};
return 0;
file.size = (unsigned long long)512 * st->st_blocks;
- if (ctx->fakeatimes && S_ISDIR(st->st_mode))
+ if (ctx->usemtime || (ctx->fakeatimes && S_ISDIR(st->st_mode)))
file.atime = st->st_mtime;
else
file.atime = st->st_atime;
HELPOPT("[--scan,--load] keep real atimes on directories") \
NOVAL(NODIRATIME) LONG(no_dir_atime) LONG(no_dir_atimes) \
HELPOPT("[--scan,--load] fake atimes on directories") \
+ NOVAL(MTIME) LONG(mtime) \
+ HELPOPT("[--scan] use mtime instead of atime") \
VAL(AGERANGE) SHORT(r) LONG(age_range) LONG(range) LONG(ages) \
HELPARG("age[-age]") HELPOPT("[--web,--html] set limits of colour coding") \
VAL(SERVERADDR) LONG(address) LONG(addr) LONG(server_address) \
int crossfs = 0;
int tqdepth = 1;
int fakediratimes = 1;
+ int mtime = 0;
#ifdef DEBUG_MAD_OPTION_PARSING_MACROS
{
case OPT_NODIRATIME:
fakediratimes = 1;
break;
+ case OPT_MTIME:
+ mtime = 1;
+ break;
case OPT_DATAFILE:
filename = optval;
break;
ctx->ninex = ninex;
ctx->crossfs = crossfs;
ctx->fakeatimes = fakediratimes;
+ ctx->usemtime = mtime;
ctx->last_output_update = time(NULL);