Find in files bug ?
-
Team,
Not sure if I should report a bug here. If not, let me know where I should post
To be honest, not sure if this is a bug. Perhaps I’m just hitting a product limitation.
If so, it would be nice to get some message indicating that .Anyhow, I’'m using Notepad++ v7.6.6 (64-bit)
When I’m doing a find in files, I noticed that the results were inaccurate.
Doing some further investigation, I found that Notepad++ does not process files in a directory structure that is too deep
It does not give an error stating that the files cannot be read, it seemingly just skips them.This is how I got to that conclusion
I wanted to perform a find in files. The search directory path was 230 characters
I was looking for the word fail in a bunch of logs but could not find any match.
I was surprised as I expected to find that word so I loaded a number of files from that directory into the editor.
When I then performed a find in all open documents, I had the expected result of finding several matches.I also noticed that the find in files operation was very fast. I doubt it actually processed all files.
In an attempt of understanding what I did wrong, I decided to use parent directory and do the search (including sub-folders). Still no results.
I used one level up and up and … . After going up a few levels, I noticed that the progress bar seemed to skip a part at the end. That seemed to confirm my hunch that we are skipping some files and therefore had not matches on the searchCould it be that we hit some error that N++ just bypasses ?
As going up a few levels in the directory structure seemed to actually search some files, I started suspecting the length of the search path.I decided to test the length of the path. In that path I had a directory with a name of size 65.
I renamed that folder to something short reducing the total length of my path to 168 charactersNow I had the expected results for the find in files function
So, in summary, when the path is too long, N++ seems to just ignore files and continue the search in files operation till completion.
If this is intended, it would be nice to have some message indicating that files were skipped. As it is implemented, you just get an incorrect result. One could deduce that nothing was found whilst in fact there could be matches in files that got skipped -
welcome to the notepad++ community, @Alain-Vercammen
thank you for asking.
you are absolutely correct here, to discuss possibilities or pre-discuss issues with a large audience of community members and devs.
unfortunately long full path names are still a windows problem in general.you can try to use the free utility FileSeek to test if it is working on your path structure length.
it has notepad++ integration and a lot of include/exclude, date and regex functions. much more than can ever be integrated into notepad++.if you like that it gets eventually solved, e.g. with path workaround tricks, directly at the notepad++ core, you can also follow our FAQ Desk: Feature Request or Bug Report guide, to search the issue tracker for similar path length issues, or file a new issue, if you can’t find any matching issue.
many thanks and best regards.