mirror of
https://github.com/slorelee/wimbuilder2.git
synced 2025-05-06 18:25:51 +08:00
fix issue that can't update path(s) in preset option(s) with %APP_ROOT%
This commit is contained in:
parent
4c57597410
commit
82aed2fb08
@ -21,7 +21,7 @@ function expand_opt_val(val, raw) {
|
||||
var env_path = $app_root;
|
||||
if (typeof(val) != 'string') return val;
|
||||
if (!raw) {
|
||||
env_path = $app_root.replace('\\', '\\\\');
|
||||
env_path = $app_root.replace(/\\/g, '\\\\');
|
||||
}
|
||||
return str_replace(val, '%APP_ROOT%', env_path);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ function patches_opt_stringify(line) {
|
||||
if (line == null) line = "<br\/>";
|
||||
str = str.replace(/("[^"]+?":".*?",)/g, "$1" + line);
|
||||
str = str.replace(/("[^"]+?":[^"]+?,)/g, "$1" + line);
|
||||
var env_path = $app_root.replace('\\', '\\\\');
|
||||
var env_path = $app_root.replace(/\\/g, '\\\\');
|
||||
str = str_replace(str, env_path, '%APP_ROOT%');
|
||||
return str;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user