[Banshee-List] Odd Import Problems
- From: "Nick Bargnesi" <nick den-4 com>
- To: "Banshee List" <banshee-list gnome org>
- Subject: [Banshee-List] Odd Import Problems
- Date: Tue, 14 Nov 2006 00:51:52 +0000
I seem to be having some odd import problems running the 0.10.x, 0.11.x, and cvs versions of Banshee. I've traced the problems down to two segments of code (in cvs at least ) that for some reason, don't do what they should on my system.
On import of a directory, the last output Banshee gives me is:
Setting IO Backend to Banshee.IO.Unix.IOConfig (unix)The first piece of code is inside the internal FileStat struct in
Unix.cs.
internal FileStat(string path)
{ buf = new Stat();
is_directory = is_regular_file = Syscall.stat(path, out buf) == 0; is_regular_file &= (buf.st_mode
& FilePermissions.S_IFREG) == FilePermissions.S_IFREG; is_directory &= (buf.st_mode & FilePermissions.S_IFDIR
) == FilePermissions.S_IFDIR; // FIXME: workaround for
http://bugzilla.ximian.com/show_bug.cgi?id=76966 is_directory &= ! ((buf.st_mode & FilePermissions.S_IFSOCK
) == FilePermissions.S_IFSOCK); }When this constructor is called, it is being passed a directory /static/MP3s.
The first is_directory statement is set to true, as /static/MP3s is a directory. The next two is_directory assignments get set to false. After that the import operation stops.
Commenting out those last two is_directory assignments at least sets is_directory to true and the import operation continues - at least up until here:
public IEnumerable GetDirectories(string directory)
{ UnixDirectoryInfo unix_dir = new UnixDirectoryInfo(directory);
foreach(UnixFileSystemInfo entry in unix_dir.GetFileSystemEntries()) {
if(
entry.IsDirectory && entry.Exists && !entry.IsSocket) {
yield return entry.FullName; }
}
}
So here, /static/MP3s is enumerated - it contains artists which in turn contain the album(s). Every single artist I have is enumerated and every single artist has entry.IsDirectory as false. Though
entry.Exists and !entry.IsSocket are true.
Anyone have any ideas?
--
nick den-4 comDen 4 F/OSS Developer and Co-Founder
http://www.den-4.comDen 4 Software is a group of open source software engineers dedicated to
giving back to the F/OSS community.
Join here:
http://www.den-4.com/user/register
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]