SUMMARY I'm not sure exactly how broken this is, but when i try to run a command with quotes in it (parameters with spaces) the command doesn't run successfuly. I tried running nircmd.exe (https://www.nirsoft.net/utils/nircmd.html) program to speak text with parameters: nircmd.exe speak text "Hello world asd asd" 2 the command expects [speak] [text] [Text to speak] [speak rate] [volume] but the computer spoke Backslash Hello world asd asd Backslash So it somehow understands that the text i put between the quotes is just one argument (it doesn't overwrite speak rate and volume), but it adds backslashes somewhere. I tried editing the config file in the AppData folder and removing some backslashes there, but it deleted all of my commands. I also tried looking at the source code, but I don't understand much C++ For writing this report, I created a simple executable that just writes its arguments to a file, with the following C# code: public class a{ public static void Main(string[] args){ File.AppendAllText("D:\\args.txt", args.Length.ToString() + " Values:\r\n"); for(int i=0; i<args.Length; i++){ File.AppendAllText("D:\\args.txt", args[i]); File.AppendAllText("D:\\args.txt", "\r\n"); }}} And now that program says it gets 7 arguments when i run with the same commands. (It doesn't accept quoted string as a single command, while if i run it from command line, it does.) It says the third argument starts with a quote and sixth one ends with a quote. STEPS TO REPRODUCE 1. Be on Windows 2. Create a Command that uses quotes in the command 3. Watch it break in different ways OBSERVED RESULT While the nircmd.exe program gets the argument with additional backslashes, my test program gets each word in the arguments seperately. EXPECTED RESULT Both of the commands to work like executing with them with cmd /k as runplugincommand.cpp tries to do SOFTWARE/OS VERSIONS Windows: Windows 10 1909 - Kde connect 1.4-573 Android: 1.16 ADDITIONAL INFORMATION
Thanks for reporting the bug. I just pushed a patch to fix this. It's available at https://invent.kde.org/network/kdeconnect-kde/commit/3b7d51dc804a075af7eef26f9b415f05187c66b4 The nightly build doesn't work right now, but if you want to test if it works fine for you now, go ahead and install the package made on my machine hosted here : https://baadal.my.to/s/BPBZ6NRNig9HrQR Alternatively, ping me on @PiyushAggarwal on Telegram. I'll keep you in the loop and let you know when the nightly is good again.
Thanks for the patch! Looks like it works great. In the past I couldn't get it to work with specifying an absolute executable path, but now that works too.
Awesome! PS: the nightly is well again!