From 6c647806b4a832f3dff28978ac91177bd5b978b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=9F=D1=83?= =?UTF-8?q?=D0=B7=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 19 Nov 2018 15:34:56 +0300 Subject: [PATCH] Add backup timesheet --- worktimer.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worktimer.scm b/worktimer.scm index 847aaf0..54cfb11 100755 --- a/worktimer.scm +++ b/worktimer.scm @@ -935,6 +935,8 @@ (when (and (list? sheet') (not (null? sheet'))) + (when (access? ts-file W_OK) + (copy-file ts-file (string-append ts-file ".bak"))) (with-output-to-file ts-file (lambda () (print-timesheet sheet' deadlines' archives'))))))))))