if (read_only) return -EROFS;
+ dir_cache_invalidate (from);
dir_cache_invalidate (to);
/* XXX It's not clear how close the 'mv' command is to the
if (read_only) return -EROFS;
+ dir_cache_invalidate (from);
dir_cache_invalidate (to);
- r = guestfs_ln (g, to, from);
+ r = guestfs_ln (g, from, to);
if (r == -1)
return error ();
time_t mtsecs = ts[1].tv_sec;
long mtnsecs = ts[1].tv_nsec;
+#ifdef UTIME_NOW
if (atnsecs == UTIME_NOW)
atnsecs = -1;
+#endif
+#ifdef UTIME_OMIT
if (atnsecs == UTIME_OMIT)
atnsecs = -2;
+#endif
+#ifdef UTIME_NOW
if (mtnsecs == UTIME_NOW)
mtnsecs = -1;
+#endif
+#ifdef UTIME_OMIT
if (mtnsecs == UTIME_OMIT)
mtnsecs = -2;
+#endif
r = guestfs_utimens (g, path, atsecs, atnsecs, mtsecs, mtnsecs);
if (r == -1)