View | Details | Raw Unified | Return to bug 117362
Collapse All | Expand All

(-)beagled/FileSystemQueryable/DirectoryModel.cs (-1 / +9 lines)
Lines 172-178 namespace Beagle.Daemon.FileSystemQuerya Link Here
172
		}
172
		}
173
173
174
		public bool NeedsCrawl {
174
		public bool NeedsCrawl {
175
			get { return state != DirectoryState.Clean; }
175
			get {
176
				return state != DirectoryState.Clean
177
					&& state != DirectoryState.Uncrawlable;
178
			}
176
		}
179
		}
177
180
178
		public object WatchHandle {
181
		public object WatchHandle {
Lines 212-217 namespace Beagle.Daemon.FileSystemQuerya Link Here
212
				state = DirectoryState.PossiblyClean;
215
				state = DirectoryState.PossiblyClean;
213
			else
216
			else
214
				state = DirectoryState.Clean;
217
				state = DirectoryState.Clean;
218
		}
219
220
		public void MarkAsUncrawlable ()
221
		{
222
			state = DirectoryState.Uncrawlable;
215
		}
223
		}
216
224
217
		///////////////////////////////////////////////////////////
225
		///////////////////////////////////////////////////////////
(-)beagled/FileSystemQueryable/DirectoryState.cs (+4 lines)
Lines 42-47 namespace Beagle.Daemon.FileSystemQuerya Link Here
42
42
43
		// Something definitely has changed.
43
		// Something definitely has changed.
44
		Dirty         = 3,
44
		Dirty         = 3,
45
46
		// Something is wrong: probably funky permissions.
47
		// Never try to crawl a directory in this state.
48
		Uncrawlable   = 4
45
	}
49
	}
46
50
47
}
51
}
(-)beagled/FileSystemQueryable/FileCrawlTask.cs (-2 / +2 lines)
Lines 103-111 namespace Beagle.Daemon.FileSystemQuerya Link Here
103
				Logger.Log.Debug ("Couldn't crawl '{0}'", current_dir.FullName);
103
				Logger.Log.Debug ("Couldn't crawl '{0}'", current_dir.FullName);
104
104
105
				// FIXME: If our attempt to crawl the directory fails, just
105
				// FIXME: If our attempt to crawl the directory fails, just
106
				// mark it as clean and move on.  This isn't optimal behavior,
106
				// mark it as uncrawlable and move on.  This isn't optimal behavior,
107
				// but works around bugs involving weird permissions for now.
107
				// but works around bugs involving weird permissions for now.
108
				queryable.DoneCrawlingOneDirectory (current_dir);
108
				current_dir.MarkAsUncrawlable ();
109
				current_dir = null;
109
				current_dir = null;
110
			}
110
			}
111
			
111
			
(-)beagled/FileSystemQueryable/FileSystemQueryable.cs (+15 lines)
Lines 712-717 namespace Beagle.Daemon.FileSystemQuerya Link Here
712
			dir.MarkAsClean ();
712
			dir.MarkAsClean ();
713
		}
713
		}
714
714
715
		public void MarkDirectoryAsUncrawlable (DirectoryModel dir)
716
		{
717
			if (! dir.IsAttached)
718
				return;
719
			
720
			// If we managed to get set up a watch on this directory,
721
			// drop it.
722
			if (dir.WatchHandle != null) {
723
				event_backend.ForgetWatch (dir.WatchHandle);
724
				dir.WatchHandle = null;
725
			}
726
727
			dir.MarkAsUncrawlable ();
728
		}
729
715
		public void Recrawl (string path) 
730
		public void Recrawl (string path) 
716
		{
731
		{
717
			// Try to find a directory model for the path specified
732
			// Try to find a directory model for the path specified

Return to bug 117362