diff --git a/build/asar.gni b/build/asar.gni index 400a397b98d94..7f73ed723a59e 100644 --- a/build/asar.gni +++ b/build/asar.gni @@ -16,6 +16,7 @@ template("chdir_action") { ]) assert(defined(cwd), "Need cwd in $target_name") script = "//electron/build/run-in-dir.py" + sources += [ invoker.script ] args = [ cwd, rebase_path(invoker.script), diff --git a/tools/js2asar.py b/tools/js2asar.py index 3f912fedb1d4d..145c1298c6fbb 100755 --- a/tools/js2asar.py +++ b/tools/js2asar.py @@ -26,7 +26,7 @@ def copy_files(source_files, output_dir, folder_name): output_path = os.path.join(output_dir, source_file) # Files that aren't in the default_app folder need to be put inside # the temp one we are making so they end up in the ASAR - if not source_file.startswith(folder_name + os.sep): + if not os.path.normpath(source_file).startswith(folder_name + os.sep): output_path = os.path.join(output_dir, folder_name, source_file) safe_mkdir(os.path.dirname(output_path)) shutil.copy2(source_file, output_path)