fish: --ro will be default in 1.10, not 1.8.
[libguestfs.git] / src / appliance.c
index 30eb6fd..1b6b505 100644 (file)
@@ -320,7 +320,6 @@ check_for_cached_appliance (guestfs_h *g,
   snprintf (filename, len, "%s/checksum", cachedir);
 
   (void) mkdir (cachedir, 0755);
-  (void) utime (cachedir, NULL);
 
   /* See if the cache directory exists and passes some simple checks
    * to make sure it has not been tampered with.
@@ -344,6 +343,8 @@ check_for_cached_appliance (guestfs_h *g,
     return -1;
   }
 
+  (void) utime (cachedir, NULL);
+
   garbage_collect_appliances (cachedir);
 
   /* Try to open and acquire a lock on the checksum file. */