aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-29 18:25:30 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-29 18:25:30 +0200
commite16bc630d3cc15da269c5cdaeaa525eea5bd0c74 (patch)
tree9f5219bb429686cb8c345cebadf9199d4131ae05
parent3df10c6ce075f1539c9470c01778bd50e91ab99b (diff)
downloaddna-backup-e16bc630d3cc15da269c5cdaeaa525eea5bd0c74.tar.gz
dna-backup-e16bc630d3cc15da269c5cdaeaa525eea5bd0c74.zip
okay EvalSymlinks() should be what we want instead of Clean()
-rw-r--r--repo_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/repo_test.go b/repo_test.go
index 9e72ac0..5a0abea 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -177,7 +177,10 @@ func TestSymlinks(t *testing.T) {
multi := io.MultiWriter(&output, os.Stderr)
logger.SetOutput(multi)
defer logger.SetOutput(os.Stderr)
- tmpDir := filepath.Clean(t.TempDir())
+ tmpDir, err := filepath.EvalSymlinks(t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
extDir := t.TempDir()
f, err := os.Create(filepath.Join(tmpDir, "existing"))
if err != nil {