cbconvert icon indicating copy to clipboard operation
cbconvert copied to clipboard

The file, directory, or volume name syntax is incorrect

Open turmoil-preshow opened this issue 1 year ago • 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

turmoil-preshow avatar Apr 18 '24 15:04 turmoil-preshow

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

gen2brain avatar Apr 19 '24 15:04 gen2brain

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

neroes avatar Sep 23 '24 18:09 neroes

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

neroes avatar Sep 23 '24 18:09 neroes

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

neroes avatar Sep 23 '24 20:09 neroes