dav/main.c

changeset 352
76bd29a11cc9
parent 350
5fc457fb2cb1
child 353
e554f3d72d9e
equal deleted inserted replaced
351:11789a88d0b0 352:76bd29a11cc9
940 fprintf(stderr, "Key %s not found!\nAbort.\n", keyname); 940 fprintf(stderr, "Key %s not found!\nAbort.\n", keyname);
941 // TODO: free 941 // TODO: free
942 return -1; 942 return -1;
943 } 943 }
944 } 944 }
945
946 // if encryption is requested, but we still don't know the key, abort
947 if (DAV_IS_ENCRYPTED(sn) && !(sn->key)) {
948 fprintf(stderr, "Encryption has been requested, "
949 "but no default key is configured.\n"
950 "You may specify a custom key with the '-k' option.\n");
951 return -1;
952 }
945 953
946 char *tar = cmd_getoption(a, "tar"); 954 char *tar = cmd_getoption(a, "tar");
955
947 int ret; 956 int ret;
948 if(!tar) { 957 if(!tar) {
949 if(!strcmp(file, "-")) { 958 if(!strcmp(file, "-")) {
950 FILE *in = stdin; 959 FILE *in = stdin;
951 ret = put_file(repo, a, sn, path, "stdin", in, 0); 960 ret = put_file(repo, a, sn, path, "stdin", in, 0);

mercurial