-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
covergen fails to find epubs #49
Comments
That could be likely. Can you try running |
Sure:
There is also the usual |
Oops, I mixed up the flags (I don't use Windows). I meant to show a verbose listing, not a wide one, but I think I know why. Are you able to access the System Volume Information dir in Explorer? |
Yes; this is FAT32 so the usual ACLs do not work. Python's
Update: I will try to debug this locally later to see where it might be failing. |
In the end, I have no idea about Go (never touched it before) so to work around this issue I did this in covergen.go: func filevisit(filelist *[]string) filepath.WalkFunc {
return func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if strings.EqualFold(filepath.Ext(path), ".epub") {
*filelist = append(*filelist, path)
}
return nil
}
}
func scan(root string) ([]string, error) {
filelist := []string{}
err := filepath.Walk(root, filevisit(&filelist))
if err != nil {
panic(err)
return nil, err
}
return filelist, nil
} This way it works fine. |
That's pretty good for a first attempt. I guess I could switch to A few comments:
|
Thank you for the pointers; I come from mainly Assembler, C and Ada, Go just is not quite my cup of tea so I never tried it before but your Kobo tools are quite nice, so I decided to try my hand at finding a workaround. Would you like me to polish this a bit and submit a PR? |
If you want to. Otherwise, I'll just commit it directly. |
I would rather avoid adding extra steps and the possibility of further mistakes, so I will leave it to you. Thanks! |
OK, I'll do it next week. |
Sorry, I forgot about this. I'll do it tomorrow. |
covergen finishes immediately without doing anything:
There are 6.4 GB of epub files in M:\Books.
Wonder if this is related to mattn/go-zglob#27 somehow?
The text was updated successfully, but these errors were encountered: