+ if ( filename.empty() )
+ {
+ // TODO account for adding the files as well
+ filename = wxDirSelector("Choose a folder to watch", "",
+ wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
+ if ( filename.empty() )
+ return;
+ }
+
+ wxCHECK_RET(m_watcher, "Watcher not initialized");
+
+ wxLogDebug("Adding %s: '%s'",
+ filename,
+ type == wxFSWPath_Dir ? "directory" : "directory tree");