diff --git a/collects/repo-time-stamp/stamp.rkt b/collects/repo-time-stamp/stamp.rkt index f764632f8e..e71cedc568 100644 --- a/collects/repo-time-stamp/stamp.rkt +++ b/collects/repo-time-stamp/stamp.rkt @@ -8,7 +8,8 @@ (require racket/system racket/runtime-path) -(define-runtime-path this "stamp.rkt") +(define-runtime-path this-dir ".") +(define-runtime-path this-file "stamp.rkt") (define stamp (let ([rx:secs+id #rx"^([0-9]+)\\|([0-9a-f]+|-)\\|(.*?)[ \r\n]*$"]) @@ -22,14 +23,15 @@ (and exe (let ([out (open-output-string)]) (parameterize ([current-output-port out] - [current-error-port out]) + [current-error-port out] + [current-directory this-dir]) (system* exe "log" "-1" "--pretty=format:%ct|%h|g") (get-output-string out)))))) ;; fallback: get the date of this file, no id (lambda () (format "~a|-|f" - (file-or-directory-modify-seconds this))))]) + (file-or-directory-modify-seconds this-file))))]) (let* ([x (x)] [m (and (string? x) (regexp-match rx:secs+id x))] [d (and m (seconds->date (string->number (cadr m))))])