]> Cypherpunks.ru repositories - goredo.git/blobdiff - run.go
Raised copyright years
[goredo.git] / run.go
diff --git a/run.go b/run.go
index 0b77d499613f5549704b528fbfff49b440282ebd..a3740c25a83d9c8e7576e4856b974d76368526c2 100644 (file)
--- a/run.go
+++ b/run.go
@@ -1,6 +1,6 @@
 /*
 goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2022 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -616,10 +616,9 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
 
                // Was $1 touched?
                if fd, err := os.Open(path.Join(cwdOrig, tgt)); err == nil {
-                       errTouched := Err1WasTouched
                        if inodePrev == nil {
                                fd.Close()
-                               runErr.Err = errTouched
+                               runErr.Err = Err1WasTouched
                                errs <- runErr
                                return
                        }
@@ -631,7 +630,7 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
                                return
                        }
                        if !inode.Equals(inodePrev) {
-                               runErr.Err = errTouched
+                               runErr.Err = Err1WasTouched
                                errs <- runErr
                                return
                        }