3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
|
(define last-copy-time 0)
;; Sync to tmp only if in read-only mode.
(define (sync-db-to-tmp tabdat)
(let* ((db-file (conc "./" *dbdir "/main.db")))
(if (and (not (file-write-access? db-file)) ( > (current-seconds) (+ last-copy-time 5)))
(begin
(db:multi-db-sync (db:setup #f) 'old2new)
(set! last-copy-time (current-seconds))
)
)
)
|
|
|
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
|
(define last-copy-time 0)
;; Sync to tmp only if in read-only mode.
(define (sync-db-to-tmp tabdat)
(let* ((db-file (conc "./" *dbdir* "/main.db")))
(if (and (not (file-write-access? db-file)) ( > (current-seconds) (+ last-copy-time 5)))
(begin
(db:multi-db-sync (db:setup #f) 'old2new)
(set! last-copy-time (current-seconds))
)
)
)
|