mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-22 03:37:30 +08:00
filer: upload to a directory without "/" suffix
fix https://github.com/chrislusf/seaweedfs/issues/1988
This commit is contained in:
@@ -142,6 +142,14 @@ func (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileNa
|
|||||||
if fileName != "" {
|
if fileName != "" {
|
||||||
path += fileName
|
path += fileName
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if fileName != "" {
|
||||||
|
if possibleDirEntry, findDirErr := fs.filer.FindEntry(ctx, util.FullPath(path)); findDirErr == nil {
|
||||||
|
if possibleDirEntry.IsDirectory() {
|
||||||
|
path += "/" + fileName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var entry *filer.Entry
|
var entry *filer.Entry
|
||||||
|
Reference in New Issue
Block a user