python: Rearrange C files for bindings.
[libguestfs.git] / daemon / base64.c
index 1d2d1d0..f55e1f5 100644 (file)
@@ -23,7 +23,7 @@
 #include <string.h>
 #include <fcntl.h>
 
-#include "../src/guestfs_protocol.h"
+#include "guestfs_protocol.h"
 #include "daemon.h"
 #include "actions.h"
 
@@ -77,8 +77,11 @@ do_base64_in (const char *file)
     return -1;
   }
   if (r == -2) {               /* cancellation from library */
+    /* This error is ignored by the library since it initiated the
+     * cancel.  Nevertheless we must send an error reply here.
+     */
+    reply_with_error ("file upload cancelled");
     pclose (fp);
-    /* Do NOT send any error. */
     return -1;
   }