fixed some... path issues

main
m455 2021-04-15 21:57:38 -04:00
parent e243d94ea1
commit b05ddbe9d2
1 changed files with 6 additions and 6 deletions

View File

@ -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.