Megatest

Diff
Login

Differences From Artifact [a67df6fe11]:

To Artifact [d10bf78e86]:


136
137
138
139
140
141
142

143

144





145
146
147
148
149
150
151
;;   (let ((fdb (db:get-filedb dbstruct)))
;;     (filedb:get-path db id)))

;; NB// #f => return dbdir only
;;      (was planned to be;  zeroth db with name=main.db)
;;
(define (db:dbfile-path run-id)

  (let* ((dbdir           (or (configf:lookup *configdat* "setup" "dbdir")

			      (conc (configf:lookup *configdat* "setup" "linktree") "/.db")))





	 (fname           (if run-id
			      (if (eq? run-id 0) "main.db" (conc run-id ".db"))
			      #f)))
    (handle-exceptions
     exn
     (begin
       (debug:print 0 "ERROR: Couldn't create path to " dbdir)







>
|
>
|
>
>
>
>
>







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
;;   (let ((fdb (db:get-filedb dbstruct)))
;;     (filedb:get-path db id)))

;; NB// #f => return dbdir only
;;      (was planned to be;  zeroth db with name=main.db)
;;
(define (db:dbfile-path run-id)
  (let* ((dbdirs           (filter string?
				   (list (configf:lookup *configdat* "setup" "dbdir")
					 (conc *toppath* "/.db")
					 (conc (configf:lookup *configdat* "setup" "linktree") "/.db"))))
	 (existing-dirs   (filter file-exists? dbdirs))
	 (dbdir           (if (null? existing-dirs)
			      (or  (configf:lookup *configdat* "setup" "dbdir")
				   (conc *toppath* "/.db"))
			      (car existing-dirs)))
	 (fname           (if run-id
			      (if (eq? run-id 0) "main.db" (conc run-id ".db"))
			      #f)))
    (handle-exceptions
     exn
     (begin
       (debug:print 0 "ERROR: Couldn't create path to " dbdir)