mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -04:00
Fix fail when keys/files folder already exists
Fixes an issue with transfer ownership in move mode where the folder "files_encryption/keys/files" already exists. Instead of failing, its existence is checked before calling mkdir. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
parent
0770cb82b2
commit
e455b71ecd
1 changed files with 5 additions and 1 deletions
|
|
@ -740,7 +740,11 @@ class Encryption extends Wrapper {
|
|||
|
||||
if ($sourceStorage->is_dir($sourceInternalPath)) {
|
||||
$dh = $sourceStorage->opendir($sourceInternalPath);
|
||||
$result = $this->mkdir($targetInternalPath);
|
||||
if (!$this->is_dir($targetInternalPath)) {
|
||||
$result = $this->mkdir($targetInternalPath);
|
||||
} else {
|
||||
$result = true;
|
||||
}
|
||||
if (is_resource($dh)) {
|
||||
while ($result and ($file = readdir($dh)) !== false) {
|
||||
if (!Filesystem::isIgnoredDir($file)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue