path-equal? built

This commit is contained in:
2026-04-28 23:39:05 +02:00
parent 042047a355
commit a2875f61b6
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -20,6 +20,7 @@
fatal-rktplayer
(all-from-out simple-log)
list-drop!
path-equal?
)
@@ -117,3 +118,22 @@
(call-with-values (λ () (split-path file))
(λ (dir file d) dir))
file)))
(define (path-equal? p1 p2)
(let ((p1* (build-path p1))
(p2* (build-path p2))
)
(let ((e1 (explode-path (normal-case-path p1)))
(e2 (explode-path (normal-case-path p2))))
(if (= (length e1) (length e2))
(letrec ((f (λ (l1 l2)
(if (null? l1)
#t
(if (string=? (format "~a" (car l1)) (format "~a" (car l2)))
(f (cdr l1) (cdr l2))
#f)))))
(f e1 e2))
#f)
)
)
)