HP Forums
WP_34S: Patch for wp34s_lib.pl - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: WP_34S: Patch for wp34s_lib.pl (/thread-246060.html)

WP_34S: Patch for wp34s_lib.pl - Marcel Samek - 07-05-2013

The patch below fixes a problem that happens if the executables are being run from a path that has spaces in it. The patch simply encloses the path in quotes.

Index: wp34s_lib.pl
--- wp34s_lib.pl (revision 3425)
+++ wp34s_lib.pl (working copy)
@@ -798,7 +798,7 @@
die_msg(this_function((caller(0))[3]), "Cannot locate daughter script '$prog' in current directory or '$script_dir'.");
$location =~ s:\\:/:g;
- $cmd = "${location}$prog $cmd_line";
+ $cmd = "\"${location}\"$prog $cmd_line";
$cmd .= " -e2so"; # Make sure to slurp up the STDERR to STDOUT so we can see any errors.

# Force the colour mode to be off if in debug mode because with this damn MS-DOS STDERR