at 22.05-pre 144 lines 5.6 kB view raw
1From 830d0db80f2fce09e12c117f8338b8e4b05866ff Mon Sep 17 00:00:00 2001 2From: Pascal Winkelmann <pascal@wnklmnn.de> 3Date: Tue, 19 May 2020 10:28:31 +0200 4Subject: [PATCH] fixpaths 5 6--- 7 KeePass/Native/NativeMethods.Unix.cs | 2 +- 8 KeePass/UI/UISystemFonts.cs | 2 +- 9 KeePass/Util/AppLocator.cs | 2 +- 10 KeePass/Util/ClipboardUtil.Unix.cs | 14 +++++++------- 11 KeePassLib/Native/ClipboardU.cs | 2 +- 12 KeePassLib/Native/NativeLib.cs | 2 +- 13 KeePassLib/Utility/MonoWorkarounds.cs | 4 ++-- 14 7 files changed, 14 insertions(+), 14 deletions(-) 15 16diff --git a/KeePass/Native/NativeMethods.Unix.cs b/KeePass/Native/NativeMethods.Unix.cs 17index 4c47258..79cfdb2 100644 18--- a/KeePass/Native/NativeMethods.Unix.cs 19+++ b/KeePass/Native/NativeMethods.Unix.cs 20@@ -130,7 +130,7 @@ namespace KeePass.Native 21 try 22 { 23 Application.DoEvents(); // E.g. for clipboard updates 24- string strOutput = NativeLib.RunConsoleApp("xdotool", strParams); 25+ string strOutput = NativeLib.RunConsoleApp("@xdotool@", strParams); 26 Application.DoEvents(); // E.g. for clipboard updates 27 return (strOutput ?? string.Empty); 28 } 29diff --git a/KeePass/UI/UISystemFonts.cs b/KeePass/UI/UISystemFonts.cs 30index 08d6134..2bfa4a2 100644 31--- a/KeePass/UI/UISystemFonts.cs 32+++ b/KeePass/UI/UISystemFonts.cs 33@@ -188,7 +188,7 @@ namespace KeePass.UI 34 35 private static void UbuntuLoadFonts() 36 { 37- string strDef = NativeLib.RunConsoleApp("gsettings", 38+ string strDef = NativeLib.RunConsoleApp("@gsettings@", 39 "get org.gnome.desktop.interface font-name"); 40 if(strDef == null) return; 41 42diff --git a/KeePass/Util/AppLocator.cs b/KeePass/Util/AppLocator.cs 43index af02803..8a32c9d 100644 44--- a/KeePass/Util/AppLocator.cs 45+++ b/KeePass/Util/AppLocator.cs 46@@ -429,7 +429,7 @@ namespace KeePass.Util 47 if(NativeLib.GetPlatformID() == PlatformID.MacOSX) 48 strArgPrefix = string.Empty; // FR 3535696 49 50- string str = NativeLib.RunConsoleApp("whereis", strArgPrefix + strApp); 51+ string str = NativeLib.RunConsoleApp("@whereis@", strArgPrefix + strApp); 52 if(str == null) return null; 53 54 str = str.Trim(); 55diff --git a/KeePass/Util/ClipboardUtil.Unix.cs b/KeePass/Util/ClipboardUtil.Unix.cs 56index ab49ee2..7f6c50f 100644 57--- a/KeePass/Util/ClipboardUtil.Unix.cs 58+++ b/KeePass/Util/ClipboardUtil.Unix.cs 59@@ -62,7 +62,7 @@ namespace KeePass.Util 60 // "-out -selection clipboard"); 61 // if(str != null) return str; 62 63- string str = NativeLib.RunConsoleApp("xsel", 64+ string str = NativeLib.RunConsoleApp("@xsel@", 65 "--output --clipboard", null, XSelFlags); 66 if(str != null) return str; 67 68@@ -83,10 +83,10 @@ namespace KeePass.Util 69 if(string.IsNullOrEmpty(str)) 70 { 71 // xsel with an empty input can hang, thus use --clear 72- if(NativeLib.RunConsoleApp("xsel", "--clear --primary", 73+ if(NativeLib.RunConsoleApp("@xsel@", "--clear --primary", 74 null, XSelFlags) != null) 75 { 76- NativeLib.RunConsoleApp("xsel", "--clear --clipboard", 77+ NativeLib.RunConsoleApp("@xsel@", "--clear --clipboard", 78 null, XSelFlags); 79 return; 80 } 81@@ -97,10 +97,10 @@ namespace KeePass.Util 82 } 83 84 // xsel does not support --primary and --clipboard together 85- if(NativeLib.RunConsoleApp("xsel", "--input --primary", 86+ if(NativeLib.RunConsoleApp("@xsel@", "--input --primary", 87 str, XSelFlags) != null) 88 { 89- NativeLib.RunConsoleApp("xsel", "--input --clipboard", 90+ NativeLib.RunConsoleApp("@xsel@", "--input --clipboard", 91 str, XSelFlags); 92 return; 93 } 94diff --git a/KeePassLib/Native/ClipboardU.cs b/KeePassLib/Native/ClipboardU.cs 95index 291c51d..3c76380 100644 96--- a/KeePassLib/Native/ClipboardU.cs 97+++ b/KeePassLib/Native/ClipboardU.cs 98@@ -27,7 +27,7 @@ namespace KeePassLib.Native 99 { 100 internal static class ClipboardU 101 { 102- internal const string XSel = "xsel"; 103+ internal const string XSel = "@xsel@"; 104 private const string XSelV = "--version"; 105 private const string XSelR = "--output --clipboard"; 106 private const string XSelC = "--clear --clipboard"; 107diff --git a/KeePassLib/Native/NativeLib.cs b/KeePassLib/Native/NativeLib.cs 108index 2d227a3..243f4ee 100644 109--- a/KeePassLib/Native/NativeLib.cs 110+++ b/KeePassLib/Native/NativeLib.cs 111@@ -145,7 +145,7 @@ namespace KeePassLib.Native 112 // Mono returns PlatformID.Unix on Mac OS X, workaround this 113 if(m_platID.Value == PlatformID.Unix) 114 { 115- if((RunConsoleApp("uname", null) ?? string.Empty).Trim().Equals( 116+ if((RunConsoleApp("@uname@", null) ?? string.Empty).Trim().Equals( 117 "Darwin", StrUtil.CaseIgnoreCmp)) 118 m_platID = PlatformID.MacOSX; 119 } 120diff --git a/KeePassLib/Utility/MonoWorkarounds.cs b/KeePassLib/Utility/MonoWorkarounds.cs 121index e20bb3a..4fd875b 100644 122--- a/KeePassLib/Utility/MonoWorkarounds.cs 123+++ b/KeePassLib/Utility/MonoWorkarounds.cs 124@@ -41,7 +41,7 @@ namespace KeePassLib.Utility 125 { 126 public static class MonoWorkarounds 127 { 128- private const string AppXDoTool = "xdotool"; 129+ private const string AppXDoTool = "@xdotool@"; 130 131 private static Dictionary<uint, bool> g_dForceReq = new Dictionary<uint, bool>(); 132 private static Thread g_thFixClip = null; 133@@ -335,7 +335,7 @@ namespace KeePassLib.Utility 134 // } 135 // else { Debug.Assert(false); } 136 137- string strWmClass = (NativeLib.RunConsoleApp("xprop", 138+ string strWmClass = (NativeLib.RunConsoleApp("@xprop@", 139 "-id " + strHandle + " WM_CLASS") ?? string.Empty); 140 141 if(strWmClass.IndexOf("\"" + PwDefs.ResClass + "\"", 142-- 1432.25.4 144