diff --git a/pkgs/racket-doc/file/scribblings/gzip.scrbl b/pkgs/racket-doc/file/scribblings/gzip.scrbl index 9aa4d90f59..01e92e5cf8 100644 --- a/pkgs/racket-doc/file/scribblings/gzip.scrbl +++ b/pkgs/racket-doc/file/scribblings/gzip.scrbl @@ -8,13 +8,17 @@ utilities to create archive files in @exec{gzip} format, or simply to compress data using the @exec{pkzip} ``deflate'' method.} @defproc[(gzip [in-file path-string?] - [out-file path-string? (string-append in-file ".gz")]) + [out-file path-string? (path-add-extension in-file ".gz" #".")]) void?]{ Compresses data to the same format as the @exec{gzip} utility, writing the compressed data directly to a file. The @racket[in-file] argument is the name of the file to compress. If the file named by -@racket[out-file] exists, it will be overwritten.} +@racket[out-file] exists, it will be overwritten. + +@history[#:changed "6.8.0.2" + @elem{Changed default expression of @racket[out-file] to use + @racket[path-add-extension] instead of @racket[string-append].}]} @defproc[(gzip-through-ports [in input-port?] diff --git a/racket/collects/file/gzip.rkt b/racket/collects/file/gzip.rkt index a926ae09ea..0429c5923e 100644 --- a/racket/collects/file/gzip.rkt +++ b/racket/collects/file/gzip.rkt @@ -2208,7 +2208,7 @@ (define gzip (case-lambda - [(infile) (gzip infile (string-append infile ".gz"))] + [(infile) (gzip infile (path-add-extension infile ".gz" #"."))] [(infile outfile) ((car (code)) infile outfile)])) (define (gzip-through-ports in out origname time_stamp)