← Commit list

49b0f8604

Glenn L McGrath
Glenn L McGrath
2002-12-11
SOURCE BUG Duration: 5s

Subject

Fix -mtime, by Ian Abbott

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): sysdeps/linux/Config.in "fileutils/Config.in" dosyasini kaynak gosteriyor ama bu dosya repoda hic var olmadi (2002-12-05 - 2003-02-15 arasi orijinal yazar hatasi, 3238ea167 ile duzeltildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

findutils/find.c+5 -5
@@ -84,13 +84,13 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
}
#endif
#ifdef CONFIG_FEATURE_FIND_MTIME
- if (mtime_days != 0) {
+ if (mtime_char != 0) {
time_t file_age = time(NULL) - statbuf->st_mtime;
time_t mtime_secs = mtime_days * 24 * 60 * 60;
- if (!((isdigit(mtime_char) && mtime_secs >= file_age &&
- mtime_secs < file_age + 24 * 60 * 60) ||
- (mtime_char == '+' && mtime_secs >= file_age) ||
- (mtime_char == '-' && mtime_secs < file_age)))
+ if (!((isdigit(mtime_char) && file_age >= mtime_secs &&
+ file_age < mtime_secs + 24 * 60 * 60) ||
+ (mtime_char == '+' && file_age >= mtime_secs + 24 * 60 * 60) ||
+ (mtime_char == '-' && file_age < mtime_secs)))
goto no_match;
}
#endif