Changeset 15492 in project for release/4/qwiki/trunk/qwiki.scm


Ignore:
Timestamp:
08/15/09 13:12:42 (11 years ago)
Author:
sjamaan
Message:

Fix handling of directories - it was a mess before, it's better but slower now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/qwiki/trunk/qwiki.scm

    r15490 r15492  
    224224            (begin
    225225              (undo-changes! source-file)
     226              ;; No idea how to cleanly ensure a proper update...
     227              ;; The enclosing directory might have been removed, or the file
     228              ;; might have been deleted, renamed etc.  Let's just update the
     229              ;; whole tree (but this can take a long time)
     230              (ensure-latest-sources! #t)
    226231              (send-content (make-form (conc "Warning! Someone has edited this page while you were editing it. You can click save again to overwrite those changes with yours if this is the case."
    227232                                             (if auth
     
    295300  (or (string=? name ".") (string=? name "..") (string-index name #\/)))
    296301
    297 (define (ensure-latest-sources!)
     302(define (ensure-latest-sources! #!optional force?)
    298303  (if (not (directory-exists? (qwiki-source-path)))
    299304      (checkout-sources! (qwiki-source-path))
    300305      ;; Not sure if this should be done every freaking time - it's slow!
    301       #;(update-sources! (qwiki-source-path))
    302       (void)))
     306      (if force?
     307          (update-sources! (qwiki-source-path))
     308          (void))))
    303309
    304310;; Spiffy handler for requests that should be routed to the wiki
Note: See TracChangeset for help on using the changeset viewer.