mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-27 01:36:28 +00:00
changed removeStr to removeStrOneTime
This commit is contained in:
parent
bce99f2a65
commit
dc809c1223
5 changed files with 31 additions and 9 deletions
|
|
@ -234,8 +234,9 @@
|
|||
pParams.name = main.HTMLDIR + p.name + '.html';
|
||||
lRet = main.sendFile( pParams );
|
||||
}
|
||||
else if( Util.isContainStr(p.name, FS) || Util.strCmp( p.name, '/') ){
|
||||
if( Util.isContainStr(p.name, 'no-js/') ){
|
||||
else if( Util.isContainStrAtBegin(p.name, FS) || Util.strCmp( p.name, '/') ){
|
||||
|
||||
if( Util.isContainStrAtBegin(p.name, FS + 'no-js/') ){
|
||||
var lURL = Util.removeStr(pParams.name, 'no-js/');
|
||||
return main.redirect(pParams, lURL);
|
||||
}
|
||||
|
|
@ -254,7 +255,7 @@
|
|||
var lRet = main.checkParams(pParams);
|
||||
if(lRet){
|
||||
var p = pParams;
|
||||
p.name = Util.removeStr(p.name, CloudFunc.FS) || main.SLASH;
|
||||
p.name = Util.removeStrOneTime(p.name, CloudFunc.FS) || main.SLASH;
|
||||
|
||||
fs.stat(p.name, function(pError, pStat){
|
||||
if(!pError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue