Changeset 506
- Timestamp:
- Jun 1, 2016, 8:52:37 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_fInotify.c
r496 r506 633 633 retD = sh_files_search_dir(path, &classD, &check_flagsD, 634 634 &reportedD, &rdepthD); 635 635 636 if (retD != 0) 636 637 { 637 if (ret == 0) 638 if (ret == 0) /* because checked as file below */ 638 639 { 639 640 class = classD; … … 641 642 } 642 643 } 644 rdepthD -= 1; if (rdepthD < -1) rdepthD = -1; 643 645 } 644 646 … … 650 652 { 651 653 SH_INOTIFY_IFUSED( sh.flag.inotify |= SH_INOTIFY_INSCAN; ); 654 /* Here we use classD because we check as directory now */ 652 655 sh_files_checkdir (classD, check_flagsD, rdepthD, 653 656 path, (event->len > 0) ? event->name : NULL); … … 657 660 sh_files_reset (); 658 661 } 659 660 662 } 661 663 … … 665 667 if ((ret != 0) || (event->mask & IN_ISDIR)) 666 668 { 669 int inotify_type = SH_INOTIFY_FILE; 670 671 if ((event->mask & IN_ISDIR) && (rdepthD >= 0)) 672 inotify_type = SH_INOTIFY_DIR; 673 667 674 sh_inotify_add_watch(path, &sh_file_watches, &ret, 668 675 class, check_flags, 669 (event->mask & IN_ISDIR)?SH_INOTIFY_DIR:SH_INOTIFY_FILE,676 inotify_type, 670 677 rdepthD); 671 678 }
Note:
See TracChangeset
for help on using the changeset viewer.