diff options
Diffstat (limited to 'apps/files/lib/app.php')
-rw-r--r-- | apps/files/lib/app.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files/lib/app.php b/apps/files/lib/app.php index 579e8676cfc..ccf629ae3cb 100644 --- a/apps/files/lib/app.php +++ b/apps/files/lib/app.php @@ -52,7 +52,15 @@ class App { $result['data'] = array( 'message' => $this->l10n->t("Invalid folder name. Usage of 'Shared' is reserved by ownCloud") ); - } elseif( + // rename to existing file is denied + } else if ($this->view->file_exists($dir . '/' . $newname)) { + + $result['data'] = array( + 'message' => $this->l10n->t( + "The name %s is already used in the folder %s. Please choose a different name.", + array($newname, $dir)) + ); + } else if ( // rename to "." is denied $newname !== '.' and // rename of "/Shared" is denied |