vm/qfile-copy: rename incoming directory to QubesIncoming

Also use plain source VM name as subdir (without "from-" prefix).
This commit is contained in:
Marek Marczykowski 2013-02-23 13:11:59 +01:00
parent 26ecbb0e86
commit 3bc0cdb43a
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ void wait_for_result()
if (hdr.error_code != 0) { if (hdr.error_code != 0) {
switch (hdr.error_code) { switch (hdr.error_code) {
case EEXIST: case EEXIST:
gui_fatal("File copy: not overwriting existing file. Clean incoming dir, and retry copy"); gui_fatal("File copy: not overwriting existing file. Clean QubesIncoming dir, and retry copy");
break; break;
case EINVAL: case EINVAL:
gui_fatal("File copy: Corrupted data from packer"); gui_fatal("File copy: Corrupted data from packer");

View File

@ -12,7 +12,7 @@
#include <gui-fatal.h> #include <gui-fatal.h>
#include <errno.h> #include <errno.h>
#include "filecopy.h" #include "filecopy.h"
#define INCOMING_DIR_ROOT "/home/user/incoming" #define INCOMING_DIR_ROOT "/home/user/QubesIncoming"
int prepare_creds_return_uid(char *username) int prepare_creds_return_uid(char *username)
{ {
struct passwd *pwd; struct passwd *pwd;
@ -45,7 +45,7 @@ int main(int argc, char ** argv)
exit(1); exit(1);
} }
mkdir(INCOMING_DIR_ROOT, 0700); mkdir(INCOMING_DIR_ROOT, 0700);
asprintf(&incoming_dir, "%s/from-%s", INCOMING_DIR_ROOT, remote_domain); asprintf(&incoming_dir, "%s/%s", INCOMING_DIR_ROOT, remote_domain);
mkdir(incoming_dir, 0700); mkdir(incoming_dir, 0700);
if (chdir(incoming_dir)) if (chdir(incoming_dir))
gui_fatal("Error chdir to %s", incoming_dir); gui_fatal("Error chdir to %s", incoming_dir);