rename to skipCheckParentDir
related to https://github.com/chrislusf/seaweedfs/pull/2761 It's better to default to false.
This commit is contained in:
@@ -130,8 +130,8 @@ func isAppend(r *http.Request) bool {
|
||||
return r.URL.Query().Get("op") == "append"
|
||||
}
|
||||
|
||||
func needEnsureParentDirEntry(r *http.Request) bool {
|
||||
return r.URL.Query().Get("ensureParentDir") != "false"
|
||||
func skipCheckParentDirEntry(r *http.Request) bool {
|
||||
return r.URL.Query().Get("skipCheckParentDir") != "true"
|
||||
}
|
||||
|
||||
func (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileName string, contentType string, so *operation.StorageOption, md5bytes []byte, fileChunks []*filer_pb.FileChunk, chunkOffset int64, content []byte) (filerResult *FilerPostResult, replyerr error) {
|
||||
@@ -247,7 +247,7 @@ func (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileNa
|
||||
}
|
||||
}
|
||||
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false, false, nil, needEnsureParentDirEntry(r)); dbErr != nil {
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false, false, nil, skipCheckParentDirEntry(r)); dbErr != nil {
|
||||
replyerr = dbErr
|
||||
filerResult.Error = dbErr.Error()
|
||||
glog.V(0).Infof("failing to write %s to filer server : %v", path, dbErr)
|
||||
@@ -324,7 +324,7 @@ func (fs *FilerServer) mkdir(ctx context.Context, w http.ResponseWriter, r *http
|
||||
Name: util.FullPath(path).Name(),
|
||||
}
|
||||
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false, false, nil, true); dbErr != nil {
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false, false, nil, false); dbErr != nil {
|
||||
replyerr = dbErr
|
||||
filerResult.Error = dbErr.Error()
|
||||
glog.V(0).Infof("failing to create dir %s on filer server : %v", path, dbErr)
|
||||
|
||||
Reference in New Issue
Block a user