mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Check for file/folder at location before adding
This commit is contained in:
@@ -713,7 +713,7 @@ var ICEcoder = {
|
||||
var actionElemType, cssStyle, perms, targetElem, locNest, newText, innerLI, newUL, newLI, elemType, nameLI, shortURL, newMouseOver;
|
||||
|
||||
// Adding files
|
||||
if (action=="add") {
|
||||
if (action=="add" && !document.getElementById('filesFrame').contentWindow.document.getElementById(location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file)) {
|
||||
// Is this is a file or folder and based on that, set the CSS styling & link
|
||||
actionElemType = file.indexOf(".")>-1 ? "file" : "folder";
|
||||
cssStyle = actionElemType=="file" ? "pft-file ext-" + file.substr(file.indexOf(".")+1) : "pft-directory";
|
||||
|
||||
Reference in New Issue
Block a user