Skip to content
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

fix: handle filenames with underscores in EPUB import process (#1388) #1391

Conversation

ahmed-n-abdeltwab
Copy link

Description:

This pull request addresses and resolves Issue #1388 related to importing EPUB files with underscores in the filenames. The issue caused failures when processing files with such characters.

Changes made:

  • Fixed the path handling logic to correctly handle filenames and paths containing underscores.
  • Refactored regular expressions to ensure compatibility with special characters.
  • Improved the sanitization and manipulation of file paths to prevent errors during EPUB import.
  • Added error logging to track potential path decoding issues.

Impact:

  • Ensures EPUB files with underscores in their filenames can be successfully imported without errors.
  • Enhances the robustness of file path processing for future cases.

- Updated regex patterns to correctly handle paths and filenames with underscores.
- Ensured sanitized path handling for consistent file processing.
- Added error logging for path decoding issues.
- Improved chapter and static file insertion to prevent errors with special characters.
- Refactored path manipulations for better compatibility.

Resolves #1388: Fixed issues with importing EPUB files that have underscores in their filenames.
@Palloxin
Copy link
Contributor

Palloxin commented Jan 5, 2025

I forgot to close that issue, one of the last two merged PRs resolved the bug. Not sure which one.
Screenshot_aaa

@ahmed-n-abdeltwab
Copy link
Author

Thanks for the update! It looks like one of the last two merged PRs has resolved the bug related to importing EPUB files with underscores in the filenames. Since the issue seems to be fixed, I'll close this PR now.

@ahmed-n-abdeltwab ahmed-n-abdeltwab deleted the fix/epub-import-underscore-bug-1388 branch January 5, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants