diff --git a/pkgs/racket-test-core/tests/racket/path.rktl b/pkgs/racket-test-core/tests/racket/path.rktl index 722872c4d4..458d113a32 100644 --- a/pkgs/racket-test-core/tests/racket/path.rktl +++ b/pkgs/racket-test-core/tests/racket/path.rktl @@ -12,6 +12,10 @@ (test #t pathpath #"a") (bytes->path #"aa")) (test #f pathpath #"aa") (bytes->path #"a")) +(test #f equal? (bytes->path #"a" 'unix) (bytes->path #"a" 'windows)) +(test #t equal? (bytes->path #"a" 'unix) (bytes->path #"a" 'unix)) +(test #t equal? (bytes->path #"a" 'windows) (bytes->path #"a" 'windows)) + (define (test-basic-extension path-replace-extension path-add-extension) (test (string->path "x.zo") path-replace-extension "x.rkt" ".zo") @@ -1026,7 +1030,7 @@ (err/rt-test (string->path-element "" (system-path-convention-type) #t)) (err/rt-test (string->path-element "a\0b" #t)) -(test (bytes->path #"\\\\?\\REL\\\\a/b") bytes->path-element #"a/b" 'windows #t) +(test (bytes->path #"\\\\?\\REL\\\\a/b" 'windows) bytes->path-element #"a/b" 'windows #t) (if (eq? 'windows (system-path-convention-type)) (test (bytes->path #"\\\\?\\REL\\\\a/b") string->path-element "a/b" #t) (test #f string->path-element "a/b" #t)) diff --git a/racket/src/cs/schemified/io.scm b/racket/src/cs/schemified/io.scm index 4f2c2b6208..57b297665b 100644 --- a/racket/src/cs/schemified/io.scm +++ b/racket/src/cs/schemified/io.scm @@ -17136,7 +17136,7 @@ (bytes->string/locale_0 in-bstr_0 err-char_0 start6_0 unsafe-undefined)) ((in-bstr_0 err-char5_0) (bytes->string/locale_0 in-bstr_0 err-char5_0 0 unsafe-undefined)))))) -(define finish_2714 +(define finish_2294 (make-struct-type-install-properties '(path) 2 @@ -17148,8 +17148,11 @@ prop:equal+hash (list (lambda (p1_0 p2_0 eql?_0) - (let ((app_0 (path-bytes p1_0))) - (|#%app| eql?_0 app_0 (path-bytes p2_0)))) + (if (let ((app_0 (path-bytes p1_0))) + (|#%app| eql?_0 app_0 (path-bytes p2_0))) + (let ((app_0 (path-convention p1_0))) + (eq? app_0 (path-convention p2_0))) + #f)) (lambda (p_0 hc_0) (|#%app| hc_0 (path-bytes p_0))) (lambda (p_0 hc_0) (|#%app| hc_0 (path-bytes p_0))))) (cons @@ -17182,7 +17185,7 @@ #f 2 0)) -(define effect_2995 (finish_2714 struct:path)) +(define effect_2995 (finish_2294 struct:path)) (define path1.1 (|#%name| path @@ -34395,11 +34398,11 @@ 'subprocess "(or/c (and/c output-port? file-stream-port?) #f 'stdout)" stderr_0)) - (let ((lr1323 unsafe-undefined) + (let ((lr1324 unsafe-undefined) (group_0 unsafe-undefined) (command_0 unsafe-undefined) (exact/args_0 unsafe-undefined)) - (set! lr1323 + (set! lr1324 (call-with-values (lambda () (if (path-string? group/command_0) @@ -34454,9 +34457,9 @@ ((group_1 command_1 exact/args_1) (vector group_1 command_1 exact/args_1)) (args (raise-binding-result-arity-error 3 args))))) - (set! group_0 (unsafe-vector*-ref lr1323 0)) - (set! command_0 (unsafe-vector*-ref lr1323 1)) - (set! exact/args_0 (unsafe-vector*-ref lr1323 2)) + (set! group_0 (unsafe-vector*-ref lr1324 0)) + (set! command_0 (unsafe-vector*-ref lr1324 1)) + (set! exact/args_0 (unsafe-vector*-ref lr1324 2)) (call-with-values (lambda () (if (if (pair? exact/args_0) diff --git a/racket/src/io/path/path.rkt b/racket/src/io/path/path.rkt index 1e2cb8c38d..157c21f53d 100644 --- a/racket/src/io/path/path.rkt +++ b/racket/src/io/path/path.rkt @@ -29,7 +29,8 @@ #:property prop:equal+hash (list (lambda (p1 p2 eql?) - (eql? (path-bytes p1) (path-bytes p2))) + (and (eql? (path-bytes p1) (path-bytes p2)) + (eq? (path-convention p1) (path-convention p2)))) (lambda (p hc) (hc (path-bytes p))) (lambda (p hc)