no need for the alerts
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3346 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b40bedfd69
commit
f4c16d256c
1 changed files with 0 additions and 11 deletions
|
@ -1,6 +1,5 @@
|
||||||
function FolderExists(fn)
|
function FolderExists(fn)
|
||||||
{
|
{
|
||||||
alert("testing for folder " + fn);
|
|
||||||
/*@cc_on @*/
|
/*@cc_on @*/
|
||||||
/*@if (@_jscript_version >= 5)
|
/*@if (@_jscript_version >= 5)
|
||||||
try
|
try
|
||||||
|
@ -11,13 +10,11 @@ function FolderExists(fn)
|
||||||
}
|
}
|
||||||
catch(e) { }
|
catch(e) { }
|
||||||
/*@end @*/
|
/*@end @*/
|
||||||
alert("exception or old version");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function FileExists(fn)
|
function FileExists(fn)
|
||||||
{
|
{
|
||||||
alert("testing for file " + fn);
|
|
||||||
/*@cc_on @*/
|
/*@cc_on @*/
|
||||||
/*@if (@_jscript_version >= 5)
|
/*@if (@_jscript_version >= 5)
|
||||||
try
|
try
|
||||||
|
@ -27,13 +24,11 @@ function FileExists(fn)
|
||||||
}
|
}
|
||||||
catch(e) { }
|
catch(e) { }
|
||||||
/*@end @*/
|
/*@end @*/
|
||||||
alert("exception or old version");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function TryShellExec(fn)
|
function TryShellExec(fn)
|
||||||
{
|
{
|
||||||
alert("trying to shell execute " + fn);
|
|
||||||
/*@cc_on @*/
|
/*@cc_on @*/
|
||||||
/*@if (@_jscript_version >= 5)
|
/*@if (@_jscript_version >= 5)
|
||||||
try
|
try
|
||||||
|
@ -44,7 +39,6 @@ function TryShellExec(fn)
|
||||||
}
|
}
|
||||||
catch(e) { }
|
catch(e) { }
|
||||||
/*@end @*/
|
/*@end @*/
|
||||||
alert("exception or old version");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,17 +78,13 @@ function parser(fn)
|
||||||
re = /\//g;
|
re = /\//g;
|
||||||
lfn = lfn.replace(re, "\\");
|
lfn = lfn.replace(re, "\\");
|
||||||
|
|
||||||
alert("trying to open " + lfn);
|
|
||||||
|
|
||||||
if (FolderExists(lfn))
|
if (FolderExists(lfn))
|
||||||
{
|
{
|
||||||
alert("folder exists, execing");
|
|
||||||
var objShell = new ActiveXObject("Shell.Application");
|
var objShell = new ActiveXObject("Shell.Application");
|
||||||
objShell.Open(lfn);
|
objShell.Open(lfn);
|
||||||
}
|
}
|
||||||
else if (FileExists(lfn))
|
else if (FileExists(lfn))
|
||||||
{
|
{
|
||||||
alert("file exists, execing");
|
|
||||||
execed = false;
|
execed = false;
|
||||||
htmlre = /\.html?$/;
|
htmlre = /\.html?$/;
|
||||||
txtre = /\.txt$/;
|
txtre = /\.txt$/;
|
||||||
|
@ -108,7 +98,6 @@ function parser(fn)
|
||||||
lfn = lfn.replace(re, "/");
|
lfn = lfn.replace(re, "/");
|
||||||
re = /\ /g;
|
re = /\ /g;
|
||||||
lfn = lfn.replace(re, "%20");
|
lfn = lfn.replace(re, "%20");
|
||||||
alert("using normal method " + lfn);
|
|
||||||
location.href = 'file:///' + lfn;
|
location.href = 'file:///' + lfn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue