Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Program.cs b/Program.cs
index f1386bbb..364c7cab 100644
--- a/Program.cs
+++ b/Program.cs
@@ -189,7 +189,7 @@ namespace com.clusterrr.hakchi_gui
}
}
}
-
+
[DllImport("Shell32.dll")]
private static extern int SHGetKnownFolderPath([MarshalAs(UnmanagedType.LPStruct)]Guid rfid, uint dwFlags,
IntPtr hToken, out IntPtr ppszPath);
@@ -206,7 +206,10 @@ namespace com.clusterrr.hakchi_gui
var nsmgr = new XmlNamespaceManager(libConfig.NameTable);
nsmgr.AddNamespace("ns", libConfig.LastChild.NamespaceURI);
var docs = libConfig.SelectSingleNode("//ns:searchConnectorDescription[ns:isDefaultSaveLocation='true']/ns:simpleLocation/ns:url/text()", nsmgr);
- return docs.Value;
+ if (Directory.Exists(docs.Value))
+ return docs.Value;
+ else
+ throw new Exception("Invalid Documents directory: " + docs.Value);
}
else
{