Skip to content

Commit

Permalink
clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pluckyswan committed Nov 12, 2024
1 parent c0db017 commit 7083061
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zip/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func (zipHandler ZipHandler) Unzip(zipFileName string, blobPath string) error {
// MoveZip moves a file from 'unzip' into the specified subfolder e.g. 'success', 'failure'
func (zipHandler ZipHandler) MoveZip(blobPath string, subfolder string) {
slog.Info("About to move file", slog.String("blobPath", blobPath), slog.String("destination subfolder", subfolder))
// url must include the container name e.g. 'sftp/unzip/cheeseburger.zip' vs 'unzip/cheeseburger.zip'
// url must include the container name while the blob path does not
// e.g. when 'sftp' is the container name, the url is 'sftp/unzip/cheeseburger.zip' and the blob path is 'unzip/cheeseburger.zip'
sourceUrl := filepath.Join(utils.ContainerName, blobPath)
destinationUrl := strings.Replace(sourceUrl, utils.UnzipFolder, filepath.Join(utils.UnzipFolder, subfolder), 1)
err := zipHandler.blobHandler.MoveFile(sourceUrl, destinationUrl)
Expand Down

0 comments on commit 7083061

Please sign in to comment.