electron/atom/common
Juan Cruz Viotti a99c193cf2 🏁 Preserve file extension when extracting from asar
Currently, when calling `copyFileOut`, the original extension from the
file is lost, and a generic `*.tmp` is added instead.

This becomes problematic in the scenario where we use
`child_process.execFile` on a Windows Batch script that lives inside the
`asar` package.

Windows relies on the extension being present in order to interpret the
script accordingly, which results in the following bug because the
operating system doesn't know what do to with this `*.tmp` file:

```
Error: spawn UNKNOWN
```

Steps to reproduce:

1. Create a dummy batch script (test.bat):

```
@echo off
echo "Hello world"
```

2. Create an electron app that attemps to call this script with
`child_process.execFile`:

```js
var child_process = require('child_process');
var path = require('path');

child_process.execFile(path.join(__dirname, 'test.bat'), function(error, stdout) {
    if (error) throw error;
    console.log(stdout);
});
```

3. Package this small application as an asar archive:

```sh
> asar pack mytestapp app.asar
```

4. Execute the application:

```sh
> electron.exe app.asar
```
2015-12-01 14:55:58 -04:00
..
api Add executable permission in CopyFileOut 2015-11-27 22:06:37 +08:00
asar 🏁 Preserve file extension when extracting from asar 2015-12-01 14:55:58 -04:00
crash_reporter win: Guard against failure of RtlAddFunctionTable 2015-11-05 22:00:40 +08:00
lib Add process.noAsar to turn off asar support 2015-12-01 13:09:37 +08:00
linux Rename hard-coded application names in code 2015-04-14 15:55:41 +08:00
native_mate_converters Merge pull request #3344 from deepak1556/certificate_verifier_api_patch 2015-11-17 18:53:35 +08:00
resources/mac mac: Set CFBundleExecutable for Electron Framework 2015-10-14 11:54:59 +08:00
atom_command_line.cc Move headers to atom/common 2015-06-19 23:11:53 +08:00
atom_command_line.h Move headers to atom/common 2015-06-19 23:11:53 +08:00
atom_constants.cc Put common constants in atom_constants 2015-12-01 16:21:15 +08:00
atom_constants.h Put common constants in atom_constants 2015-12-01 16:21:15 +08:00
atom_version.h Bump v0.35.2 2015-11-27 22:23:19 +08:00
chrome_version.h Upgrade to Chrome 45 2015-09-03 17:50:23 +09:00
common_message_generator.cc
common_message_generator.h
draggable_region.cc
draggable_region.h Fix ui/gfx/geometry headers 2015-03-18 09:57:38 +08:00
google_api_key.h
id_weak_map.cc use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
id_weak_map.h use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
keyboad_util.cc Merging keyCode and keyIdentifier and adjusting the docs accordingly 2015-11-16 14:51:26 +01:00
keyboad_util.h Merging keyCode and keyIdentifier and adjusting the docs accordingly 2015-11-16 14:51:26 +01:00
node_bindings.cc win: Add ELECTRON_DEFAULT_ERROR_MODE env 2015-11-06 20:25:20 +08:00
node_bindings.h
node_bindings_linux.cc
node_bindings_linux.h
node_bindings_mac.cc
node_bindings_mac.h
node_bindings_win.cc Fix for issue 1968: use uv_backend_timeout to determine timeout to match other platforms 2015-08-20 20:13:04 -06:00
node_bindings_win.h
node_includes.h No longer needs to define node_includes.h at last 2015-09-07 16:41:49 +08:00
options_switches.cc Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
options_switches.h Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
platform_util.h return bool on shell.openExternal 2015-06-10 11:06:22 -04:00
platform_util_linux.cc return bool on shell.openExternal 2015-06-10 11:06:22 -04:00
platform_util_mac.mm NSWorkspace selectFile:inFileViewerRootedAtPath: requires a non-null second argument. 2015-10-08 11:25:05 -07:00
platform_util_win.cc Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00