diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2015-06-21 23:50:58 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2015-06-21 23:50:58 +0100 |
commit | 05fb9ceef912b5414e37b350eeb120d7394e318f (patch) | |
tree | 1cbad4b2a991d32d9a9d5040c75ff16ee0ae1110 /apps/files_external | |
parent | 103f8ca6e8b00e63cf54f32b55c8eff891c631e0 (diff) | |
parent | e15dd783ab86c0c65ec626685d59fff0128f3aca (diff) | |
download | nextcloud-server-05fb9ceef912b5414e37b350eeb120d7394e318f.tar.gz nextcloud-server-05fb9ceef912b5414e37b350eeb120d7394e318f.zip |
Merge pull request #17025 from owncloud/sftp-rmdir-emptydir
Workaround for empty dir deletion for SFTP
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/sftp.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index c457a87a6c7..cbe090311a9 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -251,7 +251,11 @@ class SFTP extends \OC\Files\Storage\Common { */ public function rmdir($path) { try { - return $this->getConnection()->delete($this->absPath($path), true); + $result = $this->getConnection()->delete($this->absPath($path), true); + // workaround: stray stat cache entry when deleting empty folders + // see https://github.com/phpseclib/phpseclib/issues/706 + $this->getConnection()->clearStatCache(); + return $result; } catch (\Exception $e) { return false; } |