fix(author): sanitize log filenames to remove special characters
Applied sanitizeForPath to log filenames in createAuthorLog to ensure log files don't contain special characters like apostrophes. Before: ifuckedmybestfriend'sgirlfriend-author.videotools.log After: ifuckedmybestfriendsgirlfriend-author.videotools.log This prevents filesystem issues and improves consistency with output filenames.
This commit is contained in:
parent
a4a1c071fd
commit
f964568c15
|
|
@ -3184,6 +3184,11 @@ func createAuthorLog(inputs []string, outputPath string, makeISO bool, region, a
|
||||||
if base == "" {
|
if base == "" {
|
||||||
base = "author"
|
base = "author"
|
||||||
}
|
}
|
||||||
|
// Sanitize log filename to remove special characters
|
||||||
|
base = sanitizeForPath(base)
|
||||||
|
if base == "" {
|
||||||
|
base = "author"
|
||||||
|
}
|
||||||
logPath := filepath.Join(getLogsDir(), base+"-author"+conversionLogSuffix)
|
logPath := filepath.Join(getLogsDir(), base+"-author"+conversionLogSuffix)
|
||||||
if err := os.MkdirAll(filepath.Dir(logPath), 0o755); err != nil {
|
if err := os.MkdirAll(filepath.Dir(logPath), 0o755); err != nil {
|
||||||
return nil, logPath, fmt.Errorf("create log dir: %w", err)
|
return nil, logPath, fmt.Errorf("create log dir: %w", err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user