mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 03:54:57 +08:00
1. root dir has id of 0
2. only delete empty folders 3. correct listing files under a folder
This commit is contained in:
@@ -28,8 +28,8 @@ type DirectoryManagerInMap struct {
|
||||
func (dm *DirectoryManagerInMap) NewDirectoryEntryInMap(parent *DirectoryEntryInMap, name string) (d *DirectoryEntryInMap) {
|
||||
d = &DirectoryEntryInMap{Name: name, Parent: parent}
|
||||
d.SubDirectories = make(map[string]*DirectoryEntryInMap)
|
||||
d.Id = dm.max
|
||||
dm.max++
|
||||
d.Id = dm.max
|
||||
parts := make([]string, 0)
|
||||
for p := d; p != nil && p.Name != ""; p = p.Parent {
|
||||
parts = append(parts, p.Name)
|
||||
|
Reference in New Issue
Block a user