[banshee] LibraryWatcher: Guard against watching root dir (bgo#633309)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] LibraryWatcher: Guard against watching root dir (bgo#633309)
- Date: Tue, 22 Mar 2011 15:33:19 +0000 (UTC)
commit 64ee73869513d71aa461dc81a14bd751758ae288
Author: Frank Ziegler <funtastix googlemail com>
Date: Fri Feb 11 08:22:39 2011 +0700
LibraryWatcher: Guard against watching root dir (bgo#633309)
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
.../Banshee.LibraryWatcher/SourceWatcher.cs | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
index e36a2cc..94185fd 100644
--- a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
+++ b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
@@ -80,6 +80,11 @@ namespace Banshee.LibraryWatcher
throw new Exception ("Will not create LibraryWatcher for the entire home directory");
}
+ string root = Path.GetPathRoot (Environment.CurrentDirectory);
+ if (path == root || path == root + Path.DirectorySeparatorChar) {
+ throw new Exception ("Will not create LibraryWatcher for the entire root directory");
+ }
+
import_manager = ServiceManager.Get<LibraryImportManager> ();
watcher = new FileSystemWatcher (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]