mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
fileLoc defined by saveType, error catching no /
If we're saving a new file, fileLoc is the file location otherwise it's empty Error catching given filenames not beginning with a / by prefixing with one
This commit is contained in:
@@ -253,13 +253,13 @@ if (action=="load") {
|
||||
if (action=="save") {
|
||||
<?php
|
||||
if (strpos($file,"[NEW]")>0||$saveType=="saveAs") {
|
||||
$saveLoc = $saveType=="saveAs" ? $fileLoc : "";
|
||||
echo "fileLoc = '".$saveLoc."';"
|
||||
if (strpos($fileName,"[NEW]")>0) {echo "fileLoc = '".$fileLoc."';";} else {echo "fileLoc = '';";};
|
||||
?>
|
||||
newFileName = top.ICEcoder.getInput(fileLoc != ""
|
||||
? 'Enter filename to save at '+fileLoc
|
||||
: 'Enter filename (including path, prefixed with /)'
|
||||
,'');
|
||||
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName}
|
||||
if (newFileName) {
|
||||
newFileName = fileLoc == "" ? newFileName : fileLoc + "/" + fileName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user