removed duplicate case

This commit is contained in:
Spencer Florence 2015-09-14 16:45:40 -05:00 committed by Robby Findler
parent 47776f343d
commit 47f36952d6

View File

@ -671,13 +671,16 @@
(when id (when id
(define (this-object-location) (define (this-object-location)
(object-location (hash-ref obj-ids id))) (object-location (hash-ref obj-ids id)))
(case (datum-intern-literal mode) (define (copy-this-object perms)
[(#"100644" #"644"
#"100755" #"755")
(copy-object tmp (copy-object tmp
(this-object-location) (this-object-location)
mode perms
(build-path dest-dir fn))] (build-path dest-dir fn)))
(case (datum-intern-literal mode)
[(#"100755") #"755"
(copy-this-object #o755)]
[(#"100644" #"644")
(copy-this-object #o644)]
[(#"40000" #"040000") [(#"40000" #"040000")
(extract-tree id obj-ids tmp (build-path dest-dir fn))] (extract-tree id obj-ids tmp (build-path dest-dir fn))]
[(#"120000") [(#"120000")
@ -939,8 +942,8 @@
[else [else
(call-with-input-file* (build-path (tmp-info-dir tmp) location) proc)])) (call-with-input-file* (build-path (tmp-info-dir tmp) location) proc)]))
;; copy-object : tmp-info location bytes path -> void ;; copy-object : tmp-info location integer path -> void
(define (copy-object tmp location mode dest-file) (define (copy-object tmp location perms dest-file)
(cond (cond
[(pair? location) [(pair? location)
(define bstr (object->bytes tmp location)) (define bstr (object->bytes tmp location))
@ -952,10 +955,6 @@
(copy-file (build-path (tmp-info-dir tmp) location) (copy-file (build-path (tmp-info-dir tmp) location)
dest-file dest-file
#t)]) #t)])
(define perms
(case mode
[(#"755" #"100755") #o755]
[(#"644" #"100644") #o644]))
(file-or-directory-permissions dest-file perms)) (file-or-directory-permissions dest-file perms))
;; object->bytes : tmp-info location -> bytes ;; object->bytes : tmp-info location -> bytes