diff --git a/src/nicethings.rkt b/src/nicethings.rkt index d9b8ef0..7504a14 100644 --- a/src/nicethings.rkt +++ b/src/nicethings.rkt @@ -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.