[babl] babl-cache: fix previous cache file persisting on Win32
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl-cache: fix previous cache file persisting on Win32
- Date: Fri, 7 Apr 2017 18:17:07 +0000 (UTC)
commit 8b863c24c3f170265dbca16c7b895ac2cb63be62
Author: Edward E <develinthedetail gmail com>
Date: Fri Apr 7 01:47:45 2017 -0500
babl-cache: fix previous cache file persisting on Win32
Cygwin's rename() won't overwrite an existing file, so remove() it first
babl/babl-cache.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-cache.c b/babl/babl-cache.c
index f498115..abd6f0a 100644
--- a/babl/babl-cache.c
+++ b/babl/babl-cache.c
@@ -188,6 +188,9 @@ void babl_store_db (void)
}
fclose (dbfile);
+#ifdef _WIN32
+ remove (fish_cache_path ());
+#endif
rename (tmpp, fish_cache_path());
free (tmpp);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]