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