fixed some... path issues
parent
e243d94ea1
commit
b05ddbe9d2
|
@ -151,8 +151,8 @@
|
||||||
(displayln item))))
|
(displayln item))))
|
||||||
|
|
||||||
(define (ls)
|
(define (ls)
|
||||||
(if (and (file-exists? program-file)
|
(if (and (file-exists? program-path)
|
||||||
(has-read-permissions? program-file))
|
(has-read-permissions? program-path))
|
||||||
(let ([listof-items (file->lines program-path)])
|
(let ([listof-items (file->lines program-path)])
|
||||||
(if (null? listof-items)
|
(if (null? listof-items)
|
||||||
(displayln-messages-ref 'empty-list)
|
(displayln-messages-ref 'empty-list)
|
||||||
|
@ -175,8 +175,8 @@
|
||||||
(displayln-messages-ref 'error-item-not-found))))
|
(displayln-messages-ref 'error-item-not-found))))
|
||||||
|
|
||||||
(define (rm arg)
|
(define (rm arg)
|
||||||
(if (and (file-exists? program-file)
|
(if (and (file-exists? program-path)
|
||||||
(has-read-permissions? program-file))
|
(has-read-permissions? program-path))
|
||||||
(let ([item-number (string->number arg)])
|
(let ([item-number (string->number arg)])
|
||||||
(if item-number
|
(if item-number
|
||||||
(rm/remove-nicething item-number)
|
(rm/remove-nicething item-number)
|
||||||
|
@ -187,8 +187,8 @@
|
||||||
;; add
|
;; add
|
||||||
;; ------------------------------------------------
|
;; ------------------------------------------------
|
||||||
(define (add nicething)
|
(define (add nicething)
|
||||||
(if (and (file-exists? program-file)
|
(if (and (file-exists? program-path)
|
||||||
(has-read-permissions? program-file))
|
(has-read-permissions? program-path))
|
||||||
;; The removing and adding of the '\n' is to
|
;; The removing and adding of the '\n' is to
|
||||||
;; ensure only one '\n' exists at the end of the
|
;; ensure only one '\n' exists at the end of the
|
||||||
;; item to be added.
|
;; item to be added.
|
||||||
|
|
Loading…
Reference in New Issue