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:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-06-22 19:25:25 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-06-22 19:25:25 +0300
commitecfc731b93a7d262b7e2b38144ce2b44e3fa21dd (patch)
tree6d244f40c5d10d11a4a74bc692c4346935195a85 /Program.cs
parent9aa71fa7af284127f9642f1d00c3fb79835cc184 (diff)
Windows 10 bugfix, languages update, en-GB added
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
{