Index: datashare-testing/.sretrieve.config ================================================================== --- datashare-testing/.sretrieve.config +++ datashare-testing/.sretrieve.config @@ -1,7 +1,7 @@ [settings] -base-dir /tmp/matt/datashare/disk1 +base-dir /tmp/pjhatwal/datashare/disk1 allowed-users matt mrwellan pjhatwal allowed-chars [0-9a-zA-Z\-\.]+ default-area megatest # NOTE: packages-metadir defaults to exe dir if not specified here Index: spublish.scm ================================================================== --- spublish.scm +++ spublish.scm @@ -138,11 +138,11 @@ (begin (print "ERROR: target file already exists, remove it before re-publishing") (exit 1))) (if (not(file-exists? dest-dir-path)) (begin - (print "ERROR: target directory " target-dir " does not exists." ) + (print "ERROR: target directory " dest-dir-path " does not exists." ) (exit 1))) (spublish:db-do configdat (lambda (db) @@ -400,16 +400,19 @@ (exit 1))) (let* ((targ-link (car args)) (link-name (cadr args)) (sub-path (string-reverse (string-join (cdr (string-split (string-reverse link-name) "/")) "/"))) (msg (or (args:get-arg "-m") ""))) - (if(not (equal? sub-path link-name)) + (if (> (string-length(string-trim sub-path)) 0) (begin (print "attempting to create directory " sub-path " in " target-dir) - (spublish:validate target-dir sub-path) - - (spublish:mkdir configdat user target-dir sub-path msg))) + (spublish:validate target-dir sub-path) + (print (conc target-dir "/" sub-path ) ) + (print (directory-exists?(conc target-dir "/" sub-path ))) + (if (directory-exists?(conc target-dir "/" sub-path )) + (print "Target Directory " (conc target-dir sub-path ) " exist!!") + (spublish:mkdir configdat user target-dir sub-path msg)))) (print "attempting to create link " link-name " in " target-dir) (spublish:ln configdat user target-dir targ-link link-name msg))) ((rm) Index: sretrieve.scm ================================================================== --- sretrieve.scm +++ sretrieve.scm @@ -143,10 +143,11 @@ (if (or (not base-dir) (not (file-exists? base-dir))) (begin (debug:print 0 "ERROR: Bad configuration! base-dir " base-dir " not found") (exit 1))) + (print datadir) (if (not (file-exists? datadir)) (begin (debug:print 0 "ERROR: Bad version (" version ") or iteration (" iteration "), no data found at " datadir "." ) (exit 1))) @@ -371,10 +372,11 @@ (user (current-user-name)) (allowed-users (string-split (or (configf:lookup configdat "settings" "allowed-users") ""))) (default-area (configf:lookup configdat "settings" "default-area"))) ;; otherwise known as the package + (if (not base-dir) (begin (debug:print 0 "[settings]\nbase-dir /some/path\n\n Is MISSING from the config file!") (exit))) (if (null? allowed-users)