dstcheck: do nothing if clock is clearly in the past.

Fixes #15855

Change-Id: I0a08863fa81ef96b16543d28d7e95731f34f60ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2684
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2020-05-13 02:07:21 +00:00
committed by waddlesplash
parent d5a3eb04ef
commit d7aa591102
+6
View File
@@ -107,6 +107,12 @@ main(int argc, char **argv)
time(&t);
localtime_r(&t, &tm);
if (tm.tm_year < (2020 - 1900)) {
fprintf(stderr, "%s: not checking because clock is not set.\n",
argv[0]);
exit(1);
}
char path[B_PATH_NAME_LENGTH];
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, true, path,
B_PATH_NAME_LENGTH) != B_OK) {