add check for file create if file already exists
Dieser Commit ist enthalten in:
Ursprung
c684277786
Commit
022eb6d401
|
@ -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;
|
||||
|
|
Laden…
In neuem Issue referenzieren