GNOME Bugzilla – Bug 168975
Exception on directory ending in whitespace
Last modified: 2005-05-03 18:56:49 UTC
FilesystemQueryable fails to start if a directory ending with a space exitsts. Somthing like "/home/lukas/gooey ". Here is the backtrace. WARN: Exception caught while executing Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:Void StartWorker() WARN: System.IO.IOException: /home/lukas/gooey in <0x000d5> Beagle.Util.Inotify:Watch (string,Beagle.Util.Inotify/EventType,Beagle.Util.Inotify/EventType) in <0x00010> Beagle.Util.Inotify:Watch (string,Beagle.Util.Inotify/EventType) in <0x0001b> Beagle.Daemon.FileSystemQueryable.InotifyBackend:WatchDirectories (string) in <0x000c0> Beagle.Daemon.FileSystemQueryable.FileSystemModel:ScanOne_Unlocked (Beagle.Daemon.FileSystemQueryable.FileSystemModel/Directory) in <0x0011a> Beagle.Daemon.FileSystemQueryable.FileSystemModel:ScanAll () in <0x0000d> Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:OnModelNeedsScan (Beagle.Daemon.FileSystemQueryable.FileSystemModel) in <0x00043> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_FileSystemModel (Beagle.Daemon.FileSystemQueryable.FileSystemModel) in <0x003bd> Beagle.Daemon.FileSystemQueryable.FileSystemModel:AddRoot (string) in <0x0015c> Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:StartWorker () in <0x0003d> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void () in <0x00018> Beagle.Util.ExceptionHandlingThread:ThreadStarted ()
This happes during setting the watches on the directories. Beagle.Daemon.FileSystemQueryable.InotifyBackend:WatchDirectories(string) is called with "/home/lukas/gooey" instead of "/home/lukas/gooey "
After a simple test case I figured that DirectoryInfo.GetDirectories () returns a DirectoryInfo.Name called "foobar" but the correct name is "foobar " with a space at the end. So maybe this is considered a mono bug?
Then again a Directory.Exists ("/home/lukas/foobar") returns False while Directory.Exists ("/home/lukas/foobar ") returns True.
See http://bugzilla.ximian.com/show_bug.cgi?id=65727
*** Bug 172024 has been marked as a duplicate of this bug. ***
*** Bug 172648 has been marked as a duplicate of this bug. ***
This has been fixed in mono SVN. See also: http://bugzilla.ximian.com/show_bug.cgi?id=53173
*** Bug 300988 has been marked as a duplicate of this bug. ***
*** Bug 302889 has been marked as a duplicate of this bug. ***