diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-05 00:55:35 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-05 00:55:35 +0200 |
commit | c64a4bc56f93c08cf55fb907078e588ad737684c (patch) | |
tree | f70767074a4550a2be180dd4659e2dedc922b0b4 /module/vcomponent/util | |
parent | Move lens test. (diff) | |
download | calp-c64a4bc56f93c08cf55fb907078e588ad737684c.tar.gz calp-c64a4bc56f93c08cf55fb907078e588ad737684c.tar.xz |
Major work on, something.
Diffstat (limited to 'module/vcomponent/util')
-rw-r--r-- | module/vcomponent/util/parse-cal-path.scm | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/module/vcomponent/util/parse-cal-path.scm b/module/vcomponent/util/parse-cal-path.scm index fe3a6b7d..33dbd0cc 100644 --- a/module/vcomponent/util/parse-cal-path.scm +++ b/module/vcomponent/util/parse-cal-path.scm @@ -19,24 +19,21 @@ (define cal (case (stat:type st) [(regular) - (let ((comp (call-with-input-file path parse-calendar))) - (set! (prop comp '-X-HNH-SOURCETYPE) 'file) - comp) ] + (prop (call-with-input-file path parse-calendar) + '-X-HNH-SOURCETYPE 'file)] [(directory) (report-time! (G_ "Parsing ~a") path) - (let ((comp (parse-vdir path))) - (set! (prop comp '-X-HNH-SOURCETYPE) 'vdir - (prop comp '-X-HNH-DIRECTORY) path) - comp)] + (set-properties (parse-vdir path) + (cons '-X-HNH-SOURCETYPE 'vdir) + (cons '-X-HNH-DIRECTORY path))] [(block-special char-special fifo socket unknown symlink) => (lambda (t) (scm-error 'misc-error "parse-cal-path" (G_ "Can't parse file of type ~s") (list t) #f))])) - (unless (prop cal "NAME") - (set! (prop cal "NAME") - (or (prop cal "X-WR-CALNAME") - (string-append "[" (basename path) "]")))) - - cal) + (if (prop cal 'NAME) + cal + (prop cal 'NAME + (or (prop cal 'X-WR-CALNAME) + (string-append "[" (basename path) "]"))))) |