From e043297ef86ebd1ab440890a6133948932e62d14 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 10 Aug 2011 07:41:19 -0500 Subject: [PATCH] use the supplied security guard in one more place where compiler/cm needs write permission --- collects/compiler/cm.rkt | 11 ++++++----- collects/scribblings/raco/make.scrbl | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/collects/compiler/cm.rkt b/collects/compiler/cm.rkt index ce72cf1edc..1cd80e8340 100644 --- a/collects/compiler/cm.rkt +++ b/collects/compiler/cm.rkt @@ -143,11 +143,12 @@ dir)) (define (touch path) - (file-or-directory-modify-seconds - path - (current-seconds) - (lambda () - (close-output-port (open-output-file path #:exists 'append))))) + (with-compiler-security-guard + (file-or-directory-modify-seconds + path + (current-seconds) + (lambda () + (close-output-port (open-output-file path #:exists 'append)))))) (define (try-file-time path) (file-or-directory-modify-seconds path #f (lambda () #f))) diff --git a/collects/scribblings/raco/make.scrbl b/collects/scribblings/raco/make.scrbl index 890f3a1a01..15e3de84d9 100644 --- a/collects/scribblings/raco/make.scrbl +++ b/collects/scribblings/raco/make.scrbl @@ -211,7 +211,7 @@ when there is no corresponding original source file. If the @racket[security-guard] argument is supplied, it is used when creating @filepath{.zo} files, @filepath{.dep} files, and @filepath{compiled/} -directories. +directories, and when it adjusts the timestamps for existing files. If it is @racket[#f], then the security guard in the @racket[current-security-guard] when the files are created is used (not the security guard at the point @@ -244,8 +244,9 @@ If @racket[file] is compiled from source, then @racket[read-syntax] is used for any required files, however. If @racket[security-guard] is not @racket[#f], then the provided security -guard is used when creating the @filepath{compiled/} directories, as well -as the @filepath{.dep} and @filepath{.zo} files. If it is @racket[#f], then +guard is used when creating the @filepath{compiled/} directories, +@filepath{.dep} and @filepath{.zo} files, and when it adjusts the timestamps +of existing files. If it is @racket[#f], then the security guard in the @racket[current-security-guard] when the files are created is used (not the security guard at the point @racket[managed-compile-zo] is called).