Skip to content

Commit

Permalink
psalm fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Apr 4, 2023
1 parent 20993af commit b9ec6ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit b9ec6ad

Please sign in to comment.