fix directory lookup nil

This commit is contained in:
Chris Lu
2020-02-25 11:13:06 -08:00
parent e86da5a491
commit 7d10fdf737
8 changed files with 22 additions and 8 deletions

View File

@@ -154,6 +154,10 @@ func (s3a *S3ApiServer) exists(ctx context.Context, parentDirectoryPath string,
glog.V(0).Infof("exists entry %v: %v", request, err)
return fmt.Errorf("exists entry %s/%s: %v", parentDirectoryPath, entryName, err)
}
if resp.Entry == nil {
exists = false
return nil
}
exists = resp.Entry.IsDirectory == isDirectory