Commit 368881fa authored by Steven Allen's avatar Steven Allen

switch symlink target type to string

(path can't represent relative paths)
parent 5c6a7519
......@@ -782,12 +782,12 @@ func (tp *provider) TestLs(t *testing.T) {
if entry.Name != "name-of-symlink" {
t.Errorf("expected name = name-of-symlink, got %s", entry.Name)
}
if entry.Target.String() != "/foo/bar" {
if entry.Target != "/foo/bar" {
t.Errorf("expected symlink target to be /foo/bar, got %s", entry.Target)
}
if int(entry.Size) != len(entry.Target.String()) {
t.Errorf("expected size = %d, got %d", len(entry.Target.String()), entry.Size)
if int(entry.Size) != len(entry.Target) {
t.Errorf("expected size = %d, got %d", len(entry.Target), entry.Size)
}
if l, ok := <-entries; ok {
t.Errorf("didn't expect a second link")
......
......@@ -53,7 +53,7 @@ type DirEntry struct {
// Only filled when asked to resolve the directory entry.
Size uint64 // The size of the file in bytes (or the size of the symlink).
Type FileType // The type of the file.
Target Path // The symlink target (if a symlink).
Target string // The symlink target (if a symlink).
Err error
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment