dav/scfg.c

changeset 66
f8c1f685e08e
parent 65
d4077e8175f3
child 75
56962faf2b42
--- a/dav/scfg.c	Sun Nov 09 11:30:24 2014 +0100
+++ b/dav/scfg.c	Sun Nov 09 14:33:23 2014 +0100
@@ -160,7 +160,8 @@
         regcomp(matchnothing, "///", REG_NOSUB);
         dir->exclude = ucx_list_append(NULL, matchnothing);
     }
-    if (trash) {
+    
+    if (trash && sstrtrim(sstr(trash)).length > 0) {
         if (trash[0] == '/') {
             dir->trash = strdup(trash);
         } else {
@@ -176,6 +177,8 @@
                 fprintf(stderr, "Cannot create trash directory.\n");
             }
         }
+    } else {
+        dir->trash = NULL;
     }
     
     ucx_map_cstr_put(directories, name, dir);

mercurial