Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-01-29 23:32:25 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-01-29 23:32:25 +0300
commit4b157b44cad099c375801453dc245da660f0cb85 (patch)
tree8cb54535a37dccf062b5b434693a3e781520e0ed /winsup/utils
parent37c5b6d929bd6acd0f64467ccbd8a298a77ad98a (diff)
Cygwin: cygcheck: lower setup.ini expiration time to 3 hours
...as is default for dnf Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/mingw/cygcheck.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc
index 777347371..7ac19afe5 100644
--- a/winsup/utils/mingw/cygcheck.cc
+++ b/winsup/utils/mingw/cygcheck.cc
@@ -2126,12 +2126,12 @@ struct passwd {
static FILE *
maybe_download_setup_ini ()
{
- time_t t24h_before;
+ time_t t3h_before;
char *path;
struct stat st;
FILE *fp;
- t24h_before = time (NULL) - 24 * 60 * 60;
+ t3h_before = time (NULL) - 3 * 60 * 60;
for (int i = 0; i < 2; ++i)
{
/* Check for the system-wide setup.ini file first. If that's too
@@ -2150,10 +2150,10 @@ maybe_download_setup_ini ()
cp = stpcpy (path, localappdata);
stpcpy (cp, "\\.setup.ini");
}
- /* If file exists, and has been downloaded less than 24h ago,
+ /* If file exists, and has been downloaded less than 3h ago,
and if we can open it for reading, just use it. */
if (stat (path, &st) == 0
- && st.st_mtime > t24h_before
+ && st.st_mtime > t3h_before
&& (fp = fopen (path, "rt")) != NULL)
return fp;
/* Otherwise, try to open it for writing and fetch from cygwin.com. */