use bytes->string/locale to translate paths-as-bytes to strings
svn: r5318 original commit: 89ce220ed91d41dfe4f3a50f5bae5763a01afd3b
This commit is contained in:
parent
628f5509e9
commit
fe140a7e85
|
@ -51,7 +51,7 @@
|
||||||
(define (path->pname path isdir?)
|
(define (path->pname path isdir?)
|
||||||
(let* ([name (if (member (path->string path) '("." ".."))
|
(let* ([name (if (member (path->string path) '("." ".."))
|
||||||
(path->string path) ; avoid segfault bug (PR8481)
|
(path->string path) ; avoid segfault bug (PR8481)
|
||||||
(bytes->string/utf-8 (path-element->bytes path)))]
|
(bytes->string/locale (path-element->bytes path)))]
|
||||||
[name (regexp-replace end-separators-rx name "")]
|
[name (regexp-replace end-separators-rx name "")]
|
||||||
[name (if (<= 199 (string-length name))
|
[name (if (<= 199 (string-length name))
|
||||||
(string-append (substring name 0 195) "...")
|
(string-append (substring name 0 195) "...")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user