Skip to content

Commit 0d99e16

Browse files
authored
fix(cloudreve): Manually set path to avoid empty path (#1933)
1 parent 744dbd5 commit 0d99e16

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/cloudreve/driver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func (d *Cloudreve) List(ctx context.Context, dir model.Obj, args model.ListArgs
7373
}
7474
src.Size = dprop.Size
7575
}
76+
src.Path = path.Join(dir.GetPath(), src.Name)
7677
return objectToObj(src, thumb), nil
7778
})
7879
}

drivers/cloudreve/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func objectToObj(f Object, t model.Thumbnail) *model.ObjThumb {
5959
Size: int64(f.Size),
6060
Modified: f.Date,
6161
IsFolder: f.Type == "dir",
62+
Path: f.Path,
6263
},
6364
Thumbnail: t,
6465
}

0 commit comments

Comments
 (0)