mirror of
https://github.com/rclone/rclone.git
synced 2025-08-24 03:45:45 +02:00
local: implement modtime and metadata for directories
A consequence of this is that fs.Directory returned by the local backend will now have a correct size in (rather than -1). Some tests depended on this and have been fixed by this commit too.
This commit is contained in:
@@ -81,10 +81,12 @@ func TestNewFS(t *testing.T) {
|
||||
for i, gotEntry := range gotEntries {
|
||||
what := fmt.Sprintf("%s, entry=%d", what, i)
|
||||
wantEntry := test.entries[i]
|
||||
_, isDir := gotEntry.(fs.Directory)
|
||||
|
||||
require.Equal(t, wantEntry.remote, gotEntry.Remote(), what)
|
||||
require.Equal(t, wantEntry.size, gotEntry.Size(), what)
|
||||
_, isDir := gotEntry.(fs.Directory)
|
||||
if !isDir {
|
||||
require.Equal(t, wantEntry.size, gotEntry.Size(), what)
|
||||
}
|
||||
require.Equal(t, wantEntry.isDir, isDir, what)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user