Allow any non-quote characters in a quoted filename.

In particular, allow for a space to be used in the filename. The only
character that is not permitted anymore is the quote itself ('), it
should be easy enough to allow for escaping it as in the password field
if required.

Should probably fix #54, even though the lack of data currently reported
in that issue makes it a blind guess only.
This commit is contained in:
Dimitri Fontaine 2014-04-27 22:48:52 +02:00
parent efd11ab759
commit b5dec87915

View File

@ -379,8 +379,8 @@
(:lambda (f)
(list :filename (parse-namestring (coerce f 'string)))))
(defrule quoted-filename (and #\' filename #\')
(:destructure (open f close) (declare (ignore open close)) f))
(defrule quoted-filename (and #\' (+ (not #\')) #\')
(:destructure (open f close) (declare (ignore open close)) (text f)))
(defrule maybe-quoted-filename (or quoted-filename filename)
(:identity t))