gen2brain/cbconvert

The file, directory, or volume name syntax is incorrect

Opened this issue · 4 comments

Under Windows i'm getting this error when converting recursevely, via cmd and GUI, run as administrator in both ways


C:\Users\user.name\Documents\cbr\cbconvert-1.0.0>cbconvert.exe convert C:\Users\user.name\Documents\cbr\converted\folder1 --recursive --outdir C:\Users\user.name\Documents\cbr\converted\folder1\folder3
C:\Users\user.name\Documents\cbr\converted\folder1\1.cbr: archiveSaveZip: mkdir C:\Users\user.name\Documents\cbr\converted\folder1\folder3\C:: The file, directory, or volume name syntax is incorrect

*The error "The file, directory, or volume name syntax is incorrect" has been translate in English manually

Thanks for reporting. I think I know where is the issue, but I need to find the time to fix it.

getting the same error, it seems to be caused by drive name being included in output path

tried doing a relative path, it still tries to add the full path to the end of output path

i believe i found the error
https://github.com/gen2brain/cbconvert/blob/master/cbconvert_arch.go#L26
in line 33 and 38 you
combine "c.Opts.OutDir" with "filepath.Dir(fileName)"
but the "filepath.Dir(fileName)" is a global path, so you need to remove the initial input folder

i'm not used to write or even read GOLang so i don't think anybody would appreciate me dragging variables through several functions to make a working solution

a temporary fix would be to only use the "fileName" from "filepath.Dir(fileName)", but then you will have a conflicts if 2 files share a name