repair expand-user-path

This commit is contained in:
Matthew Flatt 2017-06-21 15:43:19 -06:00
parent 6a543f4783
commit a15b16cfd9
2 changed files with 6 additions and 0 deletions

View File

@ -461,6 +461,10 @@
(arity-test expand-user-path 1 1) (arity-test expand-user-path 1 1)
(arity-test resolve-path 1 1) (arity-test resolve-path 1 1)
(when (eq? 'unix (system-path-convention-type))
(test #t complete-path? (expand-user-path "~/something"))
(test #t complete-path? (expand-user-path (string->path "~/something"))))
(map (map
(lambda (f) (lambda (f)
(err/rt-test (f (string #\a #\nul #\b)) exn:fail:contract?)) (err/rt-test (f (string #\a #\nul #\b)) exn:fail:contract?))

View File

@ -1678,6 +1678,8 @@ static char *do_expand_filename(Scheme_Object *o, char* filename, int ilen, cons
filename = scheme_strdup_and_free(new_filename); filename = scheme_strdup_and_free(new_filename);
ilen = strlen(filename); ilen = strlen(filename);
if (expanded)
*expanded = 1;
} }
#endif #endif