Fix upload losing synchronization if root not mounted (RHBZ#576879).
[libguestfs.git] / daemon / tar.c
index 5b73599..26a0d30 100644 (file)
@@ -42,12 +42,6 @@ do_tar_in (const char *dir)
   FILE *fp;
   char *cmd;
 
   FILE *fp;
   char *cmd;
 
-  if (!root_mounted || dir[0] != '/') {
-    cancel_receive ();
-    reply_with_error ("root must be mounted and path must be absolute");
-    return -1;
-  }
-
   /* "tar -C /sysroot%s -xf -" but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -xf -", dir) == -1) {
     err = errno;
   /* "tar -C /sysroot%s -xf -" but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -xf -", dir) == -1) {
     err = errno;
@@ -165,12 +159,6 @@ do_tXz_in (const char *dir, char filter)
   FILE *fp;
   char *cmd;
 
   FILE *fp;
   char *cmd;
 
-  if (!root_mounted || dir[0] != '/') {
-    cancel_receive ();
-    reply_with_error ("root must be mounted and path must be absolute");
-    return -1;
-  }
-
   /* "tar -C /sysroot%s -zxf -" but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -%cxf -", dir, filter) == -1) {
     err = errno;
   /* "tar -C /sysroot%s -zxf -" but we have to quote the dir. */
   if (asprintf_nowarn (&cmd, "tar -C %R -%cxf -", dir, filter) == -1) {
     err = errno;