parent
e90e587a91
commit
ffbae2c090
|
@ -1814,4 +1814,29 @@
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(let ([tf (make-temporary-file)])
|
||||||
|
(test tf resolve-path (path->string tf))
|
||||||
|
(unless (eq? 'windows (system-type))
|
||||||
|
(delete-file tf)
|
||||||
|
(make-file-or-directory-link "other.txt" tf)
|
||||||
|
(test (string->path "other.txt") resolve-path tf))
|
||||||
|
(delete-file tf)
|
||||||
|
(case (system-path-convention-type)
|
||||||
|
[(unix)
|
||||||
|
(test (string->path "/testing-root/testing-dir/testing-file")
|
||||||
|
resolve-path
|
||||||
|
"//testing-root/testing-dir/testing-file")
|
||||||
|
(test (string->path "/testing-root/testing-dir/testing-file")
|
||||||
|
resolve-path
|
||||||
|
"//testing-root////testing-dir//testing-file")]
|
||||||
|
[(windows)
|
||||||
|
(test (string->path "C:/testing-root/testing-dir/testing-file")
|
||||||
|
resolve-path
|
||||||
|
"C://testing-root/testing-dir/testing-file")
|
||||||
|
(test (string->path "C:/testing-root/testing-dir\\testing-file")
|
||||||
|
resolve-path
|
||||||
|
"C://testing-root////testing-dir\\\\testing-file")]))
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
|
@ -4617,7 +4617,7 @@ static Scheme_Object *do_resolve_path(int argc, Scheme_Object *argv[], int guard
|
||||||
return scheme_make_sized_path(buffer, len, 1);
|
return scheme_make_sized_path(buffer, len, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!expanded)
|
if (!expanded && SCHEME_PATHP(argv[0]))
|
||||||
return argv[0];
|
return argv[0];
|
||||||
else
|
else
|
||||||
return scheme_make_sized_path(filename, strlen(filename), 1);
|
return scheme_make_sized_path(filename, strlen(filename), 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user