]> Cypherpunks.ru repositories - goredo.git/blobdiff - do.go
DRY filepath.Abs/Rel
[goredo.git] / do.go
diff --git a/do.go b/do.go
index 4fbb6c9050d6289704f76f871cf0493ff1df63b6..202e964ea486d991d26e088b83eacabe333ef622 100644 (file)
--- a/do.go
+++ b/do.go
@@ -1,6 +1,6 @@
 /*
 goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2023 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
@@ -22,7 +22,6 @@ package main
 import (
        "os"
        "path"
-       "path/filepath"
        "strings"
 )
 
@@ -82,7 +81,7 @@ func findDo(fdDep *os.File, cwd, tgt string) (string, int, error) {
                        }
                }
                levels = append(levels, "..")
-               dirAbs, err := filepath.Abs(path.Join(cwd, updir))
+               dirAbs := mustAbs(path.Join(cwd, updir))
                if err != nil {
                        panic(err)
                }