Skip to content

Commit

Permalink
add something to basically avoid issue of having folder names which c…
Browse files Browse the repository at this point in the history
…ontain input type extension being recreated in output, they're basically not
  • Loading branch information
tauraamui committed Jul 6, 2018
1 parent a991c02 commit 91803a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cltools/raw_to_compressed.go
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ func convertToCompressed(ti tiffImage, inputType string, outputType string, show
sb.WriteString(outputDirectory)

if retainFolderStructure {
subDirToAdd := strings.Replace(ti.GetRawImage().File.Name(), inputDirectory, "", 1)
subDirToAdd = strings.Replace(subDirToAdd, filepath.Base(ti.GetRawImage().File.Name()), "", 1)
subDirToAdd := strings.Replace(ti.GetRawImage().File.Name(), inputDirectory, "", -1)
subDirToAdd = strings.Replace(subDirToAdd, filepath.Base(ti.GetRawImage().File.Name()), "", -1)
sb.WriteString(subDirToAdd)
if err := createDirectoryIfNotExists(sb.String()); err != nil {
logging.Error(err.Error())
Expand Down

0 comments on commit 91803a6

Please sign in to comment.