filer: option to create file only if it is new, O_EXCL
This commit is contained in:
@@ -176,7 +176,7 @@ func (fs *FilerServer) doAutoChunk(ctx context.Context, w http.ResponseWriter, r
|
||||
},
|
||||
Chunks: fileChunks,
|
||||
}
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry); dbErr != nil {
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false); dbErr != nil {
|
||||
fs.filer.DeleteChunks(entry.Chunks)
|
||||
replyerr = dbErr
|
||||
filerResult.Error = dbErr.Error()
|
||||
|
||||
Reference in New Issue
Block a user