diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-06-22 19:25:25 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-06-22 19:25:25 +0300 |
commit | ecfc731b93a7d262b7e2b38144ce2b44e3fa21dd (patch) | |
tree | 6d244f40c5d10d11a4a74bc692c4346935195a85 /Program.cs | |
parent | 9aa71fa7af284127f9642f1d00c3fb79835cc184 (diff) |
Windows 10 bugfix, languages update, en-GB added
Diffstat (limited to 'Program.cs')
-rw-r--r-- | Program.cs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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
{
|