Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemarsden committed Aug 24, 2022
1 parent fc38cf8 commit 18e1a0d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/server/pfs/s3/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package s3
import (
"fmt"
"io"
"log"
"net/http"
"strings"

Expand Down Expand Up @@ -45,7 +44,7 @@ func (c *controller) GetObject(r *http.Request, bucketName, file, version string

// We use listFileResult[0] rather than InspectFile result since InspectFile
// on a path that has both a file and a directory in it returns the
// directory. However, ListFile
// directory. However, ListFile will show it as a file, if it exists.
var firstFile *pfs.FileInfo
err = pc.ListFile(bucket.Commit, file, func(fi *pfs.FileInfo) (retErr error) {
if firstFile == nil {
Expand All @@ -63,16 +62,9 @@ func (c *controller) GetObject(r *http.Request, bucketName, file, version string
}
fileInfo := firstFile

// fileInfo, err := pc.InspectFile(bucket.Commit, file)
// if err != nil {
// return nil, maybeNotFoundError(r, err)
// }

// the exact object named does not exist, but perhaps is a "directory".
// "directories" do not actually exist, and certainly cannot be read.
// ("seeker can't seek")

log.Printf("==================== %s - %s", fileInfo.File.Path[1:], file)
if fileInfo.File.Path[1:] != file {
return nil, s2.NoSuchKeyError(r)
}
Expand Down

0 comments on commit 18e1a0d

Please sign in to comment.