-
-
Notifications
You must be signed in to change notification settings - Fork 70
BUG: Filepaths with square brackets, [ ], are ignored/errored #94
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
Comments
Hi @MarcG2, Thanks for reaching out! Please try the new version difPy v4.1.0 as it comes with some improvements around the algorithm. Best, |
I tested out the new version. The bug is still there. An example file path that gives that's a problem is D:\Pictures[2024] Images\img1.png If there's only one bracket as shown here, difpy works like normal D:\Pictures[2024 Images\img1.png So it appears to be a parsing issue. To replicate, simply create a folder with a bracket pair in its name and add 2 copies of the same image. |
I believe I know what's causing this problem. It's because difPy uses the glob library. Which employs unix style file path matching. I recently encountered another app that failed on paths with square brackets for this exact reason. I haven't tested it yet, but square brackets need to be escaped. If you don't want to implement a fix, I highly encourage you to at least update the documentation regarding this. Almost no Windows user are going to familiar with unix style pattern matching. |
* Added error handling for a bug that would cause difPy not to import files and folders with brackets in their filepaths
Hi @MarcG2, I was finally able to reproduce your issue. The issue would happen when a folder would have a bracket in the file path, and The issue has now been fixed with version Thanks again, |
I discovered another odd bug. If I have files located in a folder that contains square brackets in the name, difPy ends up ignoring those files. If the file name contains brackets, there doesn't seem to be a problem.
I'm using the CLI version on Windows in case that makes a difference.
EDIT:
This is in regards v4.0.1. I haven't tried 4.1 which I noticed just came out.
The text was updated successfully, but these errors were encountered: