Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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@@ -468,7 +468,7 @@ namespace KeePass.Util 47 if(NativeLib.GetPlatformID() == PlatformID.MacOSX) 48 strOpt = string.Empty; // FR 3535696 49 50- string str = NativeLib.RunConsoleApp("whereis", strOpt + strApp); 51+ string str = NativeLib.RunConsoleApp("@whereis@", strOpt + strApp); 52 if(string.IsNullOrEmpty(str)) return null; 53 54 int iSep = str.IndexOf(':'); 55diff --git a/KeePass/Util/ClipboardUtil.Unix.cs b/KeePass/Util/ClipboardUtil.Unix.cs 56--- a/KeePass/Util/ClipboardUtil.Unix.cs 57+++ b/KeePass/Util/ClipboardUtil.Unix.cs 58@@ -65,7 +65,7 @@ 59 // "-out -selection clipboard"); 60 // if(str != null) return str; 61 62- string str = NativeLib.RunConsoleApp("xsel", 63+ string str = NativeLib.RunConsoleApp("@xsel@", 64 "--output --clipboard", null, XSelFlags); 65 if(str != null) return str; 66 } 67@@ -93,10 +93,10 @@ 68 if(string.IsNullOrEmpty(str)) 69 { 70 // xsel with an empty input can hang, thus use --clear 71- if(NativeLib.RunConsoleApp("xsel", "--clear --primary", 72+ if(NativeLib.RunConsoleApp("@xsel@", "--clear --primary", 73 null, XSelFlags) != null) 74 { 75- NativeLib.RunConsoleApp("xsel", "--clear --clipboard", 76+ NativeLib.RunConsoleApp("@xsel@", "--clear --clipboard", 77 null, XSelFlags); 78 return; 79 } 80@@ -107,10 +107,10 @@ 81 } 82 83 // xsel does not support --primary and --clipboard together 84- if(NativeLib.RunConsoleApp("xsel", "--input --primary", 85+ if(NativeLib.RunConsoleApp("@xsel@", "--input --primary", 86 str, XSelFlags) != null) 87 { 88- NativeLib.RunConsoleApp("xsel", "--input --clipboard", 89+ NativeLib.RunConsoleApp("@xsel@", "--input --clipboard", 90 str, XSelFlags); 91 return; 92 } 93diff --git a/KeePassLib/Native/ClipboardU.cs b/KeePassLib/Native/ClipboardU.cs 94index 291c51d..3c76380 100644 95--- a/KeePassLib/Native/ClipboardU.cs 96+++ b/KeePassLib/Native/ClipboardU.cs 97@@ -27,7 +27,7 @@ namespace KeePassLib.Native 98 { 99 internal static class ClipboardU 100 { 101- internal const string XSel = "xsel"; 102+ internal const string XSel = "@xsel@"; 103 private const string XSelV = "--version"; 104 private const string XSelR = "--output --clipboard"; 105 private const string XSelC = "--clear --clipboard"; 106diff --git a/KeePassLib/Native/NativeLib.cs b/KeePassLib/Native/NativeLib.cs 107index 2d227a3..243f4ee 100644 108--- a/KeePassLib/Native/NativeLib.cs 109+++ b/KeePassLib/Native/NativeLib.cs 110@@ -143,7 +143,7 @@ namespace KeePassLib.Native 111 // Mono returns PlatformID.Unix on MacOS, workaround this 112 if(g_platID.Value == PlatformID.Unix) 113 { 114- if((RunConsoleApp("uname", null) ?? string.Empty).Trim().Equals( 115+ if((RunConsoleApp("@uname@", null) ?? string.Empty).Trim().Equals( 116 "Darwin", StrUtil.CaseIgnoreCmp)) 117 g_platID = PlatformID.MacOSX; 118 } 119diff --git a/KeePassLib/Utility/MonoWorkarounds.cs b/KeePassLib/Utility/MonoWorkarounds.cs 120index e20bb3a..4fd875b 100644 121--- a/KeePassLib/Utility/MonoWorkarounds.cs 122+++ b/KeePassLib/Utility/MonoWorkarounds.cs 123@@ -41,7 +41,7 @@ namespace KeePassLib.Utility 124 { 125 public static class MonoWorkarounds 126 { 127- private const string AppXDoTool = "xdotool"; 128+ private const string AppXDoTool = "@xdotool@"; 129 130 private static Dictionary<uint, bool> g_dForceReq = new Dictionary<uint, bool>(); 131 private static Thread g_thFixClip = null; 132@@ -356,7 +356,7 @@ namespace KeePassLib.Utility 133 // } 134 // else { Debug.Assert(false); } 135 136- string strWmClass = (NativeLib.RunConsoleApp("xprop", 137+ string strWmClass = (NativeLib.RunConsoleApp("@xprop@", 138 "-id " + strHandle + " WM_CLASS") ?? string.Empty); 139 140 if(strWmClass.IndexOf("\"" + PwDefs.ResClass + "\"", 141-- 1422.25.4 143