Skip to content

Commit 65a3150

Browse files
authored
Merge pull request #283 from thaJeztah/fix_TestFromDirSymlink_windows
fix TestFromDirSymlink on Windows due to missing drive-letter
2 parents db81ec0 + 109d43e commit 65a3150

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

fs/ops_test.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package fs_test
33
import (
44
"os"
55
"path/filepath"
6-
"runtime"
76
"strings"
87
"testing"
98
"time"
@@ -31,14 +30,8 @@ func TestFromDirSymlink(t *testing.T) {
3130
dir := fs.NewDir(t, "test-from-dir", fs.FromDir("testdata/copy-test-with-symlink"))
3231
defer dir.Remove()
3332

34-
currentdir, err := os.Getwd()
35-
assert.NilError(t, err)
36-
3733
link2 := filepath.FromSlash("../2")
38-
link3 := "/some/inexistent/link"
39-
if runtime.GOOS == "windows" {
40-
link3 = filepath.Join(filepath.VolumeName(currentdir), link3)
41-
}
34+
link3 := filepath.FromSlash("/some/inexistent/link")
4235

4336
expected := fs.Expected(t,
4437
fs.WithFile("1", "1\n"),

0 commit comments

Comments
 (0)