fix: if root return a file with that set
This commit is contained in:
parent
6e97b582ba
commit
8a6516e157
|
@ -72,6 +72,15 @@ func (w *dirFs) openDirectly(name string, dir *metadata.DirectoryMetadata) (fs.F
|
|||
}), nil
|
||||
}
|
||||
|
||||
if name == "." {
|
||||
return w.s5.newFile(FileParams{
|
||||
Hash: w.root.Hash.HashBytes(),
|
||||
Type: w.root.Type,
|
||||
Name: name,
|
||||
}), nil
|
||||
|
||||
}
|
||||
|
||||
return nil, fs.ErrNotExist
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue