Skip to content

Commit 4994ecc

Browse files
committed
Add additional tests for symlinks, fix bug in symlink resolval
1 parent 462a703 commit 4994ecc

File tree

7 files changed

+6
-1
lines changed

7 files changed

+6
-1
lines changed

go/tools/builders/go_path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func copySymlinkRecursively(src, dst string, writeFile func(src, dst string) err
119119
return err
120120
}
121121
if !filepath.IsAbs(target) {
122-
target = filepath.Join(src, target)
122+
target = filepath.Join(filepath.Dir(src), target)
123123
}
124124

125125
return copyRecursively(target, dst, writeFile, createDir)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../a.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b.txt

tests/core/go_path/pkg/lib/directory/nested/b.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nested-directory

0 commit comments

Comments
 (0)