apps/encryption/lib/Migration.php
/**
	 * rename system-wide private keys
	 */
rename system-wide private keys
rename system - wide private keys
private function renameSystemPrivateKeys() {
		$dh = $this->view->opendir('files_encryption');
		$this->createPathForKeys('/files_encryption/' . $this->moduleId );
		if (is_resource($dh)) {
			while (($privateKey = readdir($dh)) !== false) {
				if (!\OC\Files\Filesystem::isIgnoredDir($privateKey) ) {
					if (!$this->view->is_dir('/files_encryption/' . $privateKey)) {
						$this->view->rename('files_encryption/' . $privateKey, 'files_encryption/' . $this->moduleId . '/' . $privateKey);
						$this->renameSystemPublicKey($privateKey);
					}
				}
			}
			closedir($dh);
		}
	}
private function renameSystemPrivateKeys ( ) { $ dh = $ this -> view -> opendir ( 'files_encryption' ) ; $ this -> createPathForKeys ( '/files_encryption/' . $ this -> moduleId ) ; if ( is_resource ( $ dh ) ) { while ( ( $ privateKey = readdir ( $ dh ) ) !== false ) { if ( ! \ OC \ Files \ Filesystem :: isIgnoredDir ( $ privateKey ) ) { if ( ! $ this -> view -> is_dir ( '/files_encryption/' . $ privateKey ) ) { $ this -> view -> rename ( 'files_encryption/' . $ privateKey , 'files_encryption/' . $ this -> moduleId . '/' . $ privateKey ) ; $ this -> renameSystemPublicKey ( $ privateKey ) ; } } } closedir ( $ dh ) ; } }
rename system-wide private keys
rename system - wide private keys