aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/util.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-03-22 12:12:40 +0100
committerjaseg <git@jaseg.de>2023-03-22 23:27:12 +0100
commita6adfe4d1d19096b45a5db144dd135b3fcf94371 (patch)
treedaca490fe3aae57291444eb463f770271b35c705 /svg-flatten/src/util.cpp
parent70a7a0aa95282370a2c1c1aad4db556319770a18 (diff)
downloadgerbolyze-a6adfe4d1d19096b45a5db144dd135b3fcf94371.tar.gz
gerbolyze-a6adfe4d1d19096b45a5db144dd135b3fcf94371.tar.bz2
gerbolyze-a6adfe4d1d19096b45a5db144dd135b3fcf94371.zip
svg-flatten: Add input scaling
Diffstat (limited to 'svg-flatten/src/util.cpp')
-rw-r--r--svg-flatten/src/util.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/svg-flatten/src/util.cpp b/svg-flatten/src/util.cpp
index 0597360..1af5fb6 100644
--- a/svg-flatten/src/util.cpp
+++ b/svg-flatten/src/util.cpp
@@ -34,13 +34,19 @@ int gerbolyze::run_cargo_command(const char *cmd_name, std::vector<std::string>
bool found = false;
int proc_rc = -1;
for (int i=0; i<3; i++) {
+ std::string envvar_cx;
const char *envvar_val;
switch (i) {
case 0:
if ((envvar_val = getenv(envvar)) == NULL) {
continue;
} else {
- cmdline_c[0] = envvar_val;
+ if (envvar_val[0] == '~') {
+ envvar_cx = homedir_s + std::string(envvar_val+1);
+ cmdline_c[0] = envvar_cx.c_str();
+ } else {
+ cmdline_c[0] = envvar_val;
+ }
}
break;