If not, we should aim to iterate over the common possible locations...

Tom

On 18/07/2013 14:41, Nicholas Kwiatkowski wrote:
I'm not sure if AIR 2.6 has the ability to execute non-specific
executables.... but I think it is worth a try.

-Nick


On Thu, Jul 18, 2013 at 9:36 AM, Justin Mclean <jus...@classsoftware.com>wrote:

Hi,

you shouldn't use an absolute path for common utilities like tar, unzip,
etc.
So a better fix would be just this?

var tar:File = tar = new File("tar");
var startupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();

startupInfo.executable = tar;
startupInfo.arguments = arguments;

process = new NativeProcess();
process.start(startupInfo);

Rather than:
var tar:File;

if (_os == LINUX_OS) {
         tar = new File("/bin/tar");
}
else {
         tar = new File("/usr/bin/tar");
}

var startupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();

startupInfo.executable = tar;
startupInfo.arguments = arguments;

process = new NativeProcess();
process.start(startupInfo);

Justin




______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

Reply via email to