From c51b8f1b1b2419c90e14f61b0cfc7f82f0d2247d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 4 Mar 2008 18:57:25 +0000 Subject: [PATCH] fix file functions that require a keyword argument svn: r8879 --- collects/planet/private/planet-shared.ss | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/collects/planet/private/planet-shared.ss b/collects/planet/private/planet-shared.ss index 22fbfabca8..f89cfe2c2a 100644 --- a/collects/planet/private/planet-shared.ss +++ b/collects/planet/private/planet-shared.ss @@ -205,15 +205,14 @@ Various common pieces of code that both the client and server need to access ;; saves the given table, overwriting any file that might be there (define (save-hard-link-table table) (verify-well-formed-hard-link-parameter!) - (with-output-to-file (HARD-LINK-FILE) + (with-output-to-file (HARD-LINK-FILE) #:exists 'truncate (lambda () (display "") (for-each (lambda (row) (write (update-element 4 path->bytes row)) (newline)) - table)) - 'truncate)) + table)))) ;; add-hard-link! string (listof string) num num path -> void ;; adds the given hard link, clearing any previous ones already in place @@ -425,7 +424,7 @@ Various common pieces of code that both the client and server need to access ; copies exactly n chars to the given file from the given port. Raises an exception ; if the given number of characters are not available. (define (read-n-chars-to-file n ip file) - (let ((op (open-output-file file 'truncate))) + (let ((op (open-output-file file #:exists 'truncate))) (copy-n-chars n ip op) (close-output-port op))) @@ -487,7 +486,7 @@ Various common pieces of code that both the client and server need to access (outport (if logfile (with-handlers ((exn:fail:filesystem? (lambda (e) null-out))) - (open-output-file logfile 'append)) + (open-output-file logfile #:exists 'append)) null-out))) (parameterize ([current-output-port outport]) (f))))