Browse Source

Add fclose on opened resources

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/38080/head
Côme Chilliet 3 years ago
parent
commit
49108880d2
No known key found for this signature in database GPG Key ID: A3E2F658B28C760A
  1. 7
      apps/encryption/lib/Command/DropLegacyFileKey.php

7
apps/encryption/lib/Command/DropLegacyFileKey.php

@ -147,6 +147,13 @@ class DropLegacyFileKey extends Command {
}
$output->writeln('<error>Failed to migrate ' . $path . '</error>');
$output->writeln('<error>' . $e . '</error>', OutputInterface::VERBOSITY_VERBOSE);
} finally {
if (is_resource($copyResource)) {
fclose($copyResource);
}
if (is_resource($sourceResource)) {
fclose($sourceResource);
}
}
}

Loading…
Cancel
Save