Commit 681bacf 1 parent 0c4562e commit 681bacf Copy full SHA for 681bacf
File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ auto find_file_recursive(
73
73
) -> std::filesystem::path
74
74
{
75
75
for (size_t idx = 0 ; idx < possible_dirs.size (); ++idx) {
76
+ if (!std::filesystem::is_directory (possible_dirs[idx])) {
77
+ continue ;
78
+ }
76
79
for (auto const & dir_entry: std::filesystem::directory_iterator (possible_dirs.at (idx))) {
77
80
if (dir_entry.is_regular_file () and dir_entry.path ().filename () == file_name) {
78
81
return dir_entry.path ();
@@ -99,6 +102,7 @@ auto find_dic_dir() -> std::filesystem::path
99
102
static std::vector<std::filesystem::path> const possible_dirs = {
100
103
" /usr/lib/mecab/dic/mecab-ipadic-neologd" , // neologd is preferred if available
101
104
" /usr/lib/mecab/dic" ,
105
+ " /usr/lib64/mecab/dic" ,
102
106
user_home () / " .local/share/Anki2/addons21" ,
103
107
};
104
108
// parent path of an empty entry returns itself.
You can’t perform that action at this time.
0 commit comments