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

"Find file" started from / finds files in /var only #1371

Closed
shmuz opened this issue Oct 23, 2022 · 5 comments
Closed

"Find file" started from / finds files in /var only #1371

shmuz opened this issue Oct 23, 2022 · 5 comments

Comments

@shmuz
Copy link
Contributor

shmuz commented Oct 23, 2022

При запуске поиска (Alt+F7) из корневой папки находятся только файлы в папке /var и её подпапках.

╔═════════════════════════════ Find file ══════════════════════════════╗
║ A file mask or several file masks:                                   ║
║ *                                                                   ↓║
╟──────────────────────────────────────────────────────────────────────╢
║ Containing text:                                                     ║
║                                                                     ↓║
║ Using code page:                                                     ║
║ All code pages                                                      ↓║
╟──────────────────────────────────┬───────────────────────────────────╢
║ [ ] Case sensitive               │ [ ] Search in archives            ║
║ [ ] Whole words                  │ [ ] Search for folders            ║
║ [ ] Search for hex               │ [ ] Search in symbolic links      ║
╟──────────────────────────────────┴───────────────────────────────────╢
║ Select search area:                                                  ║
║ From the current folder         ↓  [ ] Use filter                    ║
╟──────────────────────────────────────────────────────────────────────╢
║        { Find } [ Drive ] [ Filter ] [ Advanced ] [ Cancel ]         ║
╚══════════════════════════════════════════════════════════════════════╝
@elfmz
Copy link
Owner

elfmz commented Oct 23, 2022

У меня ищет везде вроде. А у вас оно точно завершает поиск? - кнопка Stop превращается в Cancel? Может просто подвисает на каком то особенном файле или циклится на рекурсивном симлинке?

@shmuz
Copy link
Contributor Author

shmuz commented Oct 23, 2022

Картинка внизу.
Обнаружил на своём форке. Во избежание ошибки сделал клон вашего мастера, собрал и повторил эксперимент - с тем же результатом. Если у вас не воспроизводится, попробую найти сам в чём дело.
Clipboard03
Да, ещё (как дополнительную информацию) добавлю, что мой плагин, использующий FSF.FarRecursiveSearch, этой проблемы не имеет.

@elfmz
Copy link
Owner

elfmz commented Oct 23, 2022

Как выяснилось в 20й убунте воспроизводится, просто в рабочей моей 18й работает нормально.

@shmuz
Copy link
Contributor Author

shmuz commented Oct 24, 2022

Данное изменение вроде решает проблему.

diff --git a/far2l/src/scantree.cpp b/far2l/src/scantree.cpp
index b30ac422..e97ca890 100644
--- a/far2l/src/scantree.cpp
+++ b/far2l/src/scantree.cpp
@@ -133,6 +133,8 @@ void ScanTree::LeaveSubdir()
 		size_t p = strFindPath.rfind('/', strFindPath.size() - 2);
 		if (p != std::string::npos && p > 0)
 			strFindPath.resize(p + 1);
+		else
+			strFindPath = L"";
 
 	} else
 		fprintf(stderr, "ScanTree::LeaveSubdir() invoked on empty stack!\n");

@elfmz
Copy link
Owner

elfmz commented Oct 24, 2022

ага спасибо за наводку, но я наверное чуть чуть по другому сделаю, сегодня попозже

@elfmz elfmz closed this as completed in 2aa62de Oct 24, 2022
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

No branches or pull requests

2 participants