summaryrefslogtreecommitdiff
path: root/app-admin/keepass/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/keepass/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/keepass/files')
-rw-r--r--app-admin/keepass/files/keepass-2.36-xsl-path-detection.patch43
-rw-r--r--app-admin/keepass/files/keepass.xml9
2 files changed, 52 insertions, 0 deletions
diff --git a/app-admin/keepass/files/keepass-2.36-xsl-path-detection.patch b/app-admin/keepass/files/keepass-2.36-xsl-path-detection.patch
new file mode 100644
index 000000000000..c17b654d3f35
--- /dev/null
+++ b/app-admin/keepass/files/keepass-2.36-xsl-path-detection.patch
@@ -0,0 +1,43 @@
+KeePass looks for some resources (XSL files) in the executable directory,
+however under UNIX system this not a good idea, so we look into the
+CommonApplicationData SpecialFolder, which usually maps to "/usr/share/".
+So the final search path should be "/usr/share/KeePass/XSL/".
+
+--- a/KeePass/forms/AboutForm.cs
++++ b/KeePass/Forms/AboutForm.cs
+@@ -31,9 +31,11 @@
+ using KeePass.Resources;
+ using KeePass.UI;
+ using KeePass.Util;
++using KeePass.Native;
+
+ using KeePassLib;
+ using KeePassLib.Utility;
++using KeePassLib.Native;
+
+ namespace KeePass.Forms
+ {
+@@ -98,8 +100,21 @@
+ m_lvComponents.Items.Add(lvi);
+
+ lvi = new ListViewItem(KPRes.XslStylesheetsKdbx);
+- string strPath = WinUtil.GetExecutable();
+- strPath = UrlUtil.GetFileDirectory(strPath, true, false);
++
++ string strPath;
++ if (NativeLib.IsUnix())
++ {
++ strPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
++ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
++ strPath += PwDefs.ShortProductName.ToLower();
++ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
++ }
++ else
++ {
++ strPath = WinUtil.GetExecutable();
++ strPath = UrlUtil.GetFileDirectory(strPath, true, false);
++ }
++
+ strPath += AppDefs.XslFilesDir;
+ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
+ bool bInstalled = File.Exists(strPath + AppDefs.XslFileHtmlFull);
diff --git a/app-admin/keepass/files/keepass.xml b/app-admin/keepass/files/keepass.xml
new file mode 100644
index 000000000000..5e3d80dcae7b
--- /dev/null
+++ b/app-admin/keepass/files/keepass.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-keepass2">
+ <comment>KeePass database</comment>
+ <glob pattern="*.kdbx"/>
+ <icon name="keepass" />
+ </mime-type>
+</mime-info>
+