You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mlocate implements incremental updates compared to its predecessor slocate. Overall, mlocate determines whether to further index the contents of a directory based on whether the directory’s mtime (modification time) or ctime (change time) has changed.
1/* "relative" may now become a symlink to somewhere else. So we use it only 2 in safe_chdir (). */3entries_mark=obstack_alloc (&scan_dir_state.data_obstack, 0);
4dir.path=path;
5time_get_ctime (&dir.time, &st);
6time_get_mtime (&mtime, &st);
7if (time_compare (&dir.time, &mtime) <0)
8dir.time=mtime;
9while (old_dir.path!=NULL&& (cmp=dir_path_cmp (old_dir.path, path)) <0)
10 {
11old_dir_skip ();
12old_dir_next_header ();
13 }
14did_chdir= false;
15have_subdir= false;
16if (old_dir.path!=NULL&&cmp==017&&time_compare (&dir.time, &old_dir.time) ==018&& (dir.time.sec!=0||dir.time.nsec!=0))
19 {
20res=copy_old_dir (&dir);
21if (res!=-1)
22 {
23have_subdir=res;
24old_dir_next_header ();
25 goto have_dir;
26 }
27 }
28if (time_is_current (&dir.time))
29 {
30/* The directory might be changing right now and we can't be sure the31 timestamp will be changed again if more changes happen very soon, mark32 the timestamp as invalid to force rescanning the directory next time33 updatedb is run. */34dir.time.sec=0;
35dir.time.nsec=0;
36 }
37did_chdir= true;
38if (safe_chdir (cwd_fd, relative, &st) !=0)
39 goto err_chdir;
40res=scan_cwd (&dir);
41if (res==-1)
42 goto err_chdir;
43have_subdir=res;
44have_dir:
45write_directory (&dir);
46if (have_subdir!= false)
47 {
48if (did_chdir== false)
49 {
50did_chdir= true;
51if (safe_chdir (cwd_fd, relative, &st) !=0)
52 goto err_entries;
53 }
54scan_subdirs (&dir, &st);
55 }
The text was updated successfully, but these errors were encountered:
mlocate implements incremental updates compared to its predecessor slocate. Overall, mlocate determines whether to further index the contents of a directory based on whether the directory’s mtime (modification time) or ctime (change time) has changed.
The text was updated successfully, but these errors were encountered: