mirror of
https://github.com/gen2brain/cbconvert
synced 2026-06-30 09:11:54 +02:00
Fix comic chapters, issue #50
This commit is contained in:
@@ -123,6 +123,12 @@ func baseNoExt(filename string) string {
|
||||
return strings.TrimSuffix(filepath.Base(filename), filepath.Ext(filename))
|
||||
}
|
||||
|
||||
// flatName flattens a path into a single collision-free name by replacing separators.
|
||||
func flatName(name string) string {
|
||||
name = strings.ReplaceAll(name, "\\", "/")
|
||||
return strings.ReplaceAll(name, "/", "_")
|
||||
}
|
||||
|
||||
// copyFile copies reader to file.
|
||||
func copyFile(reader io.Reader, filename string) error {
|
||||
err := os.MkdirAll(filepath.Dir(filename), 0755)
|
||||
|
||||
Reference in New Issue
Block a user