[chronojump] UtilAll.OpenFolder adds quotes to process files with spaces



commit b257b94c90f5605c2c64a20575aba4b1dba0b1a5
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jun 10 11:24:51 2021 +0200

    UtilAll.OpenFolder adds quotes to process files with spaces

 src/util.cs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/util.cs b/src/util.cs
index a3426b280..68fbbde6c 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1538,7 +1538,12 @@ public class Util
 
        public static bool OpenFolder(string url)
        {
-               LogB.Information("OpenFolder: " + url);
+               LogB.Information("OpenFolder without quotes: " + url);
+
+               //add quotes to solve spacing problems
+               url = "\"" + url + "\"";
+               LogB.Information("OpenFolder with quotes: " + url);
+
                try {
                        //more system specific methods on: https://stackoverflow.com/a/49664847/12366369
                        //also if do not work, check about relative paths here: 
https://stackoverflow.com/questions/52599105/c-sharp-under-linux-process-start-exception-of-no-such-file-or-directory


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]