From b05ddbe9d2bb5f5075ea651198d837984d0ed6f8 Mon Sep 17 00:00:00 2001 From: m455 Date: Thu, 15 Apr 2021 21:57:38 -0400 Subject: [PATCH] fixed some... path issues --- src/nicethings.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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.