added a separate procedure to check program file permissions
parent
45f41c0d69
commit
7ce3d70456
|
@ -117,6 +117,9 @@
|
||||||
(close-output-port
|
(close-output-port
|
||||||
(open-output-file string)))
|
(open-output-file string)))
|
||||||
|
|
||||||
|
(define (has-program-permissions? string)
|
||||||
|
(equal? program-permissions (file-or-directory-permissions string 'bits)))
|
||||||
|
|
||||||
;; ------------------------------------------------
|
;; ------------------------------------------------
|
||||||
;; Check conditions
|
;; Check conditions
|
||||||
;; ------------------------------------------------
|
;; ------------------------------------------------
|
||||||
|
@ -130,8 +133,7 @@
|
||||||
(begin (displayln-messages-ref 'error-file-doesnt-exist)
|
(begin (displayln-messages-ref 'error-file-doesnt-exist)
|
||||||
(exit))]
|
(exit))]
|
||||||
|
|
||||||
[(not (equal? program-permissions
|
[(not (has-program-permissions? program-path))
|
||||||
(file-or-directory-permissions program-path 'bits)))
|
|
||||||
(displayln-messages-ref 'warning-permissions)]
|
(displayln-messages-ref 'warning-permissions)]
|
||||||
|
|
||||||
[else 'do-nothing]))
|
[else 'do-nothing]))
|
||||||
|
|
Loading…
Reference in New Issue