Solved Open with... broken for filenames with spaces
-
Hi, long-time user of PowerArchiver here.
I noticed that some time ago the “Open with…” functionality broke for files with spaces in the name. Tested with latest PA2017 (64bit) on Win7.The issue is that the argument isn’t passed as a single string to tools, so for instance trying to file “My Text File.txt” using “Open with…” a tool located at C:\Program Files\Tool\My_Tool.exe will try to open the following files:
%TEMP%_PAnnn\My
%TEMP%_PAnnn\Text
%TEMP%_PAnnn\File.txtBasically, the file name needs to be enclosed in double quotes for this to not happen, so tools are called “%TOOL_LOCATION%” “FILE_LOCATION%”, e.g. “C:\Program Files\Tool\My_Tool.exe” “%TEMP%_PAnnn\My Text File.txt”
Thanks in advance,
Robert
-
Hi @FreakRob
Thanks for the details.
I’ve attempted the “Open With” function on file with spaces.txt and it opened properly in notepad.Which Tool are you using so that we may test with it and also, are you getting an error message when attempting to use the “open with” function on filenames with spaces and mentioned tool?
Also, which format are the archives in? I have tested with .zip and .pa
Let us know and we will look into it.
Thanks again!
-
Hi Mili,
Notepad is a bad test case, as it by default attempts to open multiple command line arguments as a single file.
I personally experience the problem with applications that allow multiple files to be put on command line. Notepad++ will actually guess, so not a good test case. I notice this with 010 Editor (a hex editor) when I examine zipped binaries that have spaces in their names.I tested .zip and .7z and both had the same issues. I doubt it’s related to the file format as this seems purely a PowerArchiver UI/logic issue.
For testing you can replicate the issue with the following batch file and zip file:
https://mega.nz/#F!4jA0nQjA!7ev5QS3gOsoH95_KG6W-xQI just noticed that the error does not occur when initially selecting “Open with…” --> “Choose Program…” – probably because Windows handles the arguments correctly. The error only occurs when using the shortcut that is generated afterwards directly in the “Open with…” menu.
Initially, “Open with…” --> “Choose Program…” will show the correct and expected result:
Using the generated shortcut it will show that the argument was not enclosed in double quotes:
This should illustrate the bug enough to reproduce and hopefully fit it.
-
many many thanks for the details @FreakRob
we have reproduced and have logged the issue in.we appreciate the assistance!
-
@FreakRob Thank you for your report. Please check latest release:
https://forums.powerarchiver.com/topic/5747/fast-ring-powerarchiver-2017-17-00-67-68-69-70-71-73It should work now. Please let us know. Thank you!
-
@spwolf I just tried it and it works. Many thanks!
-
@FreakRob thanks a lot. 2 more bugs and free license or extension, just a reminder!