diff --git a/cmd/s3-genindex/main.go b/cmd/s3-genindex/main.go index d944f78..612a1e7 100644 --- a/cmd/s3-genindex/main.go +++ b/cmd/s3-genindex/main.go @@ -200,8 +200,8 @@ func processS3Hierarchy(objects []S3Object, opts *indexgen.Options, client *s3.C } dirName := filepath.Base(dirPath) - // Build the correct path for S3 - dirEntryPath := dirPath + "/" + // Build the correct relative path for S3 (relative to current directory) + dirEntryPath := dirName + "/" if opts.DirAppend { dirEntryPath += opts.OutputFile }