|Anonymous | Login | Signup for a new account||2018-04-27 00:34 UTC|
|My View | View Issues | Change Log | Roadmap | Doomseeker Issue Support Ranking | Rules | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003172||Doomseeker||[All Projects] Bug||public||2017-06-27 00:48||2017-11-03 04:31|
|Platform||Linux||OS||Ubuntu||OS Version||10.04 x86-64|
|Target Version||1.2||Fixed in Version||1.2|
|Summary||0003172: Zandronum shell scripts for running test builds cause no PWADs to be loaded if the path contains spaces|
|Description||One of the main file paths I give to Doomseeker is '/windows/Program Files (x86)/Zandronum/PWADs/'. When joining a server hosting Zandronum 3.0 alpha, after Doomseeker downloads the build, I fail to join the server because Zandronum has loaded 0 PWADs:http://i.imgur.com/7lEPko8.png [^]|
When I use a different path for PWADs, like '/home/konda/Links/Zandronum/PWADs', Zandronum has files loaded normally and I can join the server that runs the beta version of Zandronum. The second path I mentioned is actually a symbolic link to the first path, which proves that the cause of the problem is within the way Doomseeker calls for the zandronum executable and is related to whether the file path contains spaces.
|Steps To Reproduce||1. Set up your file paths in Doomseeker so the first one that leads to your pwads directory contains spaces in its path|
2. Join a Zandronum server that runs a beta build you don't have and let Doomseeker set everything up
|Additional Information||When searching for the cause of the problem, I noticed that Doomseeker's "Join command line" actually calls a shell script instead of the Zandronum test build executable directly.|
This is what the shell script looked like which Doomseeker was calling from the command line in my case:https://pastebin.com/atw34Ff0 [^]
The problem is the way the shell script passes the arguments to Zandronum. The $* shell expansion splits all command line arguments which contain spaces. The proper shell argument expansion which preserves the arguments exactly as they were passed to the script is "$@" (with the quotes). When I replace $* with "$@" everything works fine.
Here it clearly states that word splitting is performed on all arguments expanded with $*, and in the case of $@: 'When the expansion occurs within double quotes, each parameter expands to a separate word. That is, "$@" is equivalent to "$1" "$2" ….'
edited on: 2017-06-27 00:56
Edit: I forgot to add that this same behavior was present in Doomseeker 1.0, from the few times I've joined a Zandronum beta server.
Additionally, you can see that /usr/bin/zandronum, which is a shell script (as installed by the zandronum package from drdteam's debian package repository), also uses the "$@" expansion and so far I've never had a single problem with passing command-line arguments to this script:
konda@mint ~ $ cat /usr/bin/zandronum
exec /usr/games/zandronum/zandronum "$@"
Fixed on Linux:https://bitbucket.org/Doomseeker/doomseeker/commits/5ac4962080d59afb4a241765eca0df57f7c32465 [^]
I suspect Mac OS X suffers the same issue, but I didn't touch that because I cannot check.
|A little bit of off-topic chatter: I remember manually long ago in 1.1 fixing these by hand, but also other ShellCheck errors/warnings. Now that Zandronum 3.0 is out, I can't unfortunately remember what all the ShellCheck errors/warnings were about. This was one of them.|
|Applied same fix to OS X.|
|Only registered users can voice their support. Click here to register, or here to log in.|
|Supporters:||No one explicitly supports this issue yet.|
|Opponents:||No one explicitly opposes this issue yet.|
|2017-06-27 00:48||Konda||New Issue|
|2017-06-27 00:54||Konda||Note Added: 0017942|
|2017-06-27 00:56||Konda||Note Edited: 0017942||View Revisions|
|2017-07-02 08:41||Zalewa||Assigned To||=> Zalewa|
|2017-07-02 08:41||Zalewa||Status||new => assigned|
|2017-07-02 09:28||Zalewa||Note Added: 0017963|
|2017-07-02 09:28||Zalewa||Assigned To||Zalewa => Blzut3|
|2017-10-30 04:36||WubTheCaptain||Status||assigned => needs testing|
|2017-10-30 04:37||WubTheCaptain||Status||needs testing => needs review|
|2017-10-30 04:41||WubTheCaptain||Note Added: 0018679|
|2017-11-03 04:30||Blzut3||Note Added: 0018736|
|2017-11-03 04:30||Blzut3||Status||needs review => needs testing|
|2017-11-03 04:31||Blzut3||Fixed in Version||=> 1.2|
|2017-11-03 04:31||Blzut3||Target Version||=> 1.2|
Questions or other issues? Contact Us.
|Copyright © 2000 - 2018 MantisBT Team|