Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
psalm fixes
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Apr 4, 2023
commit b9ec6adfb2e057bcac25339e21f694569b3ec48b
2 changes: 1 addition & 1 deletion apps/encryption/lib/Command/FixKeyLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function findUserKeyForSystemFileByName(IUser $user, File $node): ?string
*
* @param string $basePath
* @param string $name
* @return \Generator<string>
* @return \Iterator<mixed, string>
*/
public function findKeysByFileName(string $basePath, string $name) {
$allKeys = $this->repair->findAllKeysInDirectory($basePath);
Expand Down
6 changes: 4 additions & 2 deletions apps/encryption/lib/Repair.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public function getUserKeyRoot(IUser $user): string {
}

public function tryReadFile(File $node): bool {
$this->keyStorage->clearKeyCache();
if ($this->keyStorage instanceof Storage) {
$this->keyStorage->clearKeyCache();
}
try {
$fh = $node->fopen('r');
// read a single chunk
Expand Down Expand Up @@ -265,7 +267,7 @@ public function getKeyPath(IUser $user, Node $node): string {
if ($this->needsSystemKey($node->getPath())) {
return $this->getSystemKeyPath($node);
} else {
return $this->getUserKeyRoot($user, $node);
return $this->getUserKeyRoot($user);
}
}

Expand Down