diff --git src/filemanager/find.c src/filemanager/find.c
index dd56ba0..bc4e01d 100644
|
|
do_search (WDialog * h) |
1211 | 1211 | static DIR *dirp = NULL; |
1212 | 1212 | static char *directory = NULL; |
1213 | 1213 | struct stat tmp_stat; |
1214 | | static int subdirs_left = 0; |
1215 | 1214 | gsize bytes_found; |
1216 | 1215 | unsigned short count; |
1217 | 1216 | |
… |
… |
do_search (WDialog * h) |
1289 | 1288 | g_snprintf (buffer, sizeof (buffer), _("Searching %s"), directory); |
1290 | 1289 | status_update (str_trunc (directory, WIDGET (h)->cols - 8)); |
1291 | 1290 | } |
1292 | | /* mc_stat should not be called after mc_opendir |
1293 | | because vfs_s_opendir modifies the st_nlink |
1294 | | */ |
1295 | | if (mc_stat (tmp_vpath, &tmp_stat) == 0) |
1296 | | subdirs_left = tmp_stat.st_nlink - 2; |
1297 | | else |
1298 | | subdirs_left = 0; |
1299 | 1291 | |
1300 | 1292 | dirp = mc_opendir (tmp_vpath); |
1301 | 1293 | vfs_path_free (tmp_vpath); |
… |
… |
do_search (WDialog * h) |
1319 | 1311 | { |
1320 | 1312 | gboolean search_ok; |
1321 | 1313 | |
1322 | | if ((subdirs_left != 0) && options.find_recurs && (directory != NULL)) |
| 1314 | if (options.find_recurs && (directory != NULL)) |
1323 | 1315 | { /* Can directory be NULL ? */ |
1324 | 1316 | /* handle relative ignore dirs here */ |
1325 | 1317 | if (options.ignore_dirs_enable && find_ignore_dir_search (dp->d_name)) |
… |
… |
do_search (WDialog * h) |
1333 | 1325 | if (mc_lstat (tmp_vpath, &tmp_stat) == 0 && S_ISDIR (tmp_stat.st_mode)) |
1334 | 1326 | { |
1335 | 1327 | push_directory (tmp_vpath); |
1336 | | subdirs_left--; |
1337 | 1328 | } |
1338 | 1329 | else |
1339 | 1330 | vfs_path_free (tmp_vpath); |