cocoa: fix put-file with extension as ""
original commit: 5f797b8f0bd80596e08427b946528ecc3a923846
This commit is contained in:
parent
1e6758321e
commit
5eb43f66b2
|
@ -60,10 +60,6 @@
|
||||||
message directory filename extension
|
message directory filename extension
|
||||||
;; file types:
|
;; file types:
|
||||||
filters
|
filters
|
||||||
#;
|
|
||||||
(apply string-append
|
|
||||||
(map (lambda (s) (format "~a|~a|" (car s) (cadr s)))
|
|
||||||
filters))
|
|
||||||
;; style:
|
;; style:
|
||||||
(cons (cond [dir? 'dir]
|
(cons (cond [dir? 'dir]
|
||||||
[put? 'put]
|
[put? 'put]
|
||||||
|
|
|
@ -29,7 +29,10 @@
|
||||||
parent)])
|
parent)])
|
||||||
|
|
||||||
(let ([extensions (append
|
(let ([extensions (append
|
||||||
(if extension (list extension) null)
|
(if (and extension
|
||||||
|
(not (equal? "" extension)))
|
||||||
|
(list extension)
|
||||||
|
null)
|
||||||
(if (memq 'packages style) (list "app") null)
|
(if (memq 'packages style) (list "app") null)
|
||||||
(for/list ([e (in-list filters)]
|
(for/list ([e (in-list filters)]
|
||||||
#:when (and (regexp-match #rx"[*][.][^.]+$" (cadr e))
|
#:when (and (regexp-match #rx"[*][.][^.]+$" (cadr e))
|
||||||
|
|
|
@ -121,7 +121,7 @@ Under Windows, if @scheme[extension] is not @scheme[#f], the returned path
|
||||||
to have an extension mapping @scheme[extension].
|
to have an extension mapping @scheme[extension].
|
||||||
|
|
||||||
Under Mac OS X 10.5 and later, if @scheme[extension] is not
|
Under Mac OS X 10.5 and later, if @scheme[extension] is not
|
||||||
@scheme[#f], the returned path will get a default extension if the
|
@scheme[#f] or @racket[""], the returned path will get a default extension if the
|
||||||
user does not supply one. If @scheme[filters] contains as
|
user does not supply one. If @scheme[filters] contains as
|
||||||
@scheme["*.*"] pattern, then the user can supply any extension that
|
@scheme["*.*"] pattern, then the user can supply any extension that
|
||||||
is recognized by the system; otherwise, the extension on the returned
|
is recognized by the system; otherwise, the extension on the returned
|
||||||
|
@ -133,7 +133,8 @@ Under Mac OS X 10.5 and later, if @scheme[extension] is not
|
||||||
extension mapping @scheme[extension].
|
extension mapping @scheme[extension].
|
||||||
|
|
||||||
Under Mac OS X versions before 10.5, the returned path will get a
|
Under Mac OS X versions before 10.5, the returned path will get a
|
||||||
default extension only if @scheme[extension] is not @scheme[#f] and
|
default extension only if @scheme[extension] is not @scheme[#f],
|
||||||
|
@scheme[extension] is not @racket[""], and
|
||||||
@scheme[filters] contains only @scheme[(string-append "*."
|
@scheme[filters] contains only @scheme[(string-append "*."
|
||||||
extension)].
|
extension)].
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user