diff --git a/conlite/includes/functions.file.php b/conlite/includes/functions.file.php index 5e19455..07e033f 100644 --- a/conlite/includes/functions.file.php +++ b/conlite/includes/functions.file.php @@ -271,6 +271,11 @@ function createFile($filename, $path) { $oNot = new Contenido_Notification(); cFileHandler::validateFilename(pathinfo($filename, PATHINFO_BASENAME)); + + if(cFileHandler::exists($path . $filename)) { + $oNot->displayNotification("error", sprintf(i18n("File already exists! Unable to create file %s"), $path . $filename)); + exit; + } if (cFileHandler::create($path . $filename)) { return true;