Extended attributes lastCrawlAttr



Hi !

I was  testing beagled and I was wondering why it didn't crawl my
directories, i saw it throws an exceptions here (CrawlQueue.cs:108)

private void SetCrawlTime (string path)
{
	DirectoryInfo dir = new DirectoryInfo (path);
	if (! dir.Exists)
		return;
	
	ExtendedAttribute.Set (dir, lastCrawlAttr, StringFu.DateTimeToString (DateTime.Now));
}

When trying to set the extended attribute on my folder (don't know what
it is exactly ?) it fails ! Here is the trace (happens only one time
when scanning for the first directory in my case, the home directory):

Unhandled Exception: System.Exception: Could not set extended attribute on /home /kikidonk: Operation not supported
in [0x00067] (at /home/kikidonk/cvs/beagle/Util/ExtendedAttribute.cs:66) Beagle. Util.ExtendedAttribute:Set (System.IO.FileSystemInfo,string,string)
in [0x00023] (at /home/kikidonk/cvs/beagle/beagled/FileSystemQueryable/CrawlQueu e.cs:114) Beagle.Daemon.FileSystemQueryable.CrawlQueue:SetCrawlTime (string)
in [0x0000a] (at /home/kikidonk/cvs/beagle/beagled/FileSystemQueryable/CrawlQueu e.cs:201) Beagle.Daemon.FileSystemQueryable.CrawlQueue:ScheduleCrawl (string)
in [0x0001a] (at /home/kikidonk/cvs/beagle/beagled/FileSystemQueryable/FileSyste mQueryable.cs:70) Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:StartWor ker ()
in <0x00053> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

Then it stops crawling.
To fix this I added a simple try/catch on the ExtendedAttribute.Set, but
  is this acceptable ? Is the attribute that important ?

private void SetCrawlTime (string path)
{
	DirectoryInfo dir = new DirectoryInfo (path);
	if (! dir.Exists)
		return;
	
	try {
		ExtendedAttribute.Set (dir, lastCrawlAttr, StringFu.DateTimeToString (DateTime.Now));
	} catch(Exception e) {
		Console.WriteLine("Failed to set xattr for dir {0}, skipping",dir);
	}
}

Also I'm adding a filter for flac files, and i'll post a patch when it
is ready (not tested yet). I looked at the Mp3 Filter, and saw it adds
fixme:artist,fixme:xx properties, is this normal ?

See you,
Raf
http://entagged.sf.net

Attachment: signature.asc
Description: PGP signature

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]