webdav: fix directory creation

This commit is contained in:
Chris Lu
2019-05-03 13:13:08 -07:00
parent 602d63eb4c
commit bfbecd7253
2 changed files with 28 additions and 38 deletions

View File

@@ -105,8 +105,8 @@ func GetEntry(ctx context.Context, filerClient FilerClient, fullFilePath string)
glog.V(3).Infof("read %s request: %v", fullFilePath, request)
resp, err := client.LookupDirectoryEntry(ctx, request)
if err != nil {
if err == ErrNotFound {
return nil
if err == ErrNotFound || strings.Contains(err.Error(), ErrNotFound.Error()) {
return ErrNotFound
}
glog.V(3).Infof("read %s attr %v: %v", fullFilePath, request, err)
return err