[banshee] [Gio] Only delete regular directories (bgo#630826)
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Gio] Only delete regular directories (bgo#630826)
- Date: Tue, 28 Sep 2010 20:15:41 +0000 (UTC)
commit f0893857a73badf56a907f088b79076a3fe48e28
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Tue Sep 28 22:06:06 2010 +0200
[Gio] Only delete regular directories (bgo#630826)
Don't delete symlinks to directories, as they would get deleted even if
they are pointing to a non-empty directory. This brings GIO in line with
the other IO backends.
.../Banshee.Gio/Banshee.IO.Gio/Directory.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Backends/Banshee.Gio/Banshee.IO.Gio/Directory.cs b/src/Backends/Banshee.Gio/Banshee.IO.Gio/Directory.cs
index 41b4162..086dea5 100644
--- a/src/Backends/Banshee.Gio/Banshee.IO.Gio/Directory.cs
+++ b/src/Backends/Banshee.Gio/Banshee.IO.Gio/Directory.cs
@@ -66,7 +66,7 @@ namespace Banshee.IO.Gio
return;
}
- if ((dir.QueryFileType (FileQueryInfoFlags.None, null) & FileType.Directory) == 0) {
+ if (dir.QueryFileType (FileQueryInfoFlags.NofollowSymlinks, null) != FileType.Directory) {
Console.WriteLine ("{0} isn't directory", directory);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]