Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Wiswedel <sascha.wiswedel@nextcloud.com>2019-12-06 16:30:05 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-12-17 12:38:12 +0300
commitf1319e1bc5816d3f000b099d5ff85ad92ea8fc72 (patch)
tree3f5327a873b3b8d96a49bebcbf099f7c489c00d0 /apps/files/lib
parenta65269ffcd9094446c74145c00e21e6832264673 (diff)
Transfer ownership function polishing
Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Service/OwnershipTransferService.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php
index 8955c2062b8..7c06096a8ac 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -83,7 +83,7 @@ class OwnershipTransferService {
// target user has to be ready
if (!$this->encryptionManager->isReadyForUser($destinationUid)) {
- throw new TransferOwnershipException("The target user is not ready to accept files. The user has at least to be logged in once.", 2);
+ throw new TransferOwnershipException("The target user is not ready to accept files. The user has at least to have logged in once.", 2);
}
$date = date('Y-m-d H-i-s');
@@ -156,8 +156,8 @@ class OwnershipTransferService {
$size = $view->getFileInfo($sourcePath, false)->getSize(false);
$freeSpace = $view->free_space($destinationUid . '/files/');
if ($size > $freeSpace) {
- $output->writeln('<error>Target user does not have enough free space available</error>');
- throw new \Exception('Execution terminated');
+ $output->writeln('<error>Target user does not have enough free space available.</error>');
+ throw new \Exception('Execution terminated.');
}
$output->writeln("Analysing files of $sourceUid ...");
@@ -185,7 +185,7 @@ class OwnershipTransferService {
// no file is allowed to be encrypted
if (!empty($encryptedFiles)) {
- $output->writeln("<error>Some files are encrypted - please decrypt them first</error>");
+ $output->writeln("<error>Some files are encrypted - please decrypt them first.</error>");
foreach ($encryptedFiles as $encryptedFile) {
/** @var FileInfo $encryptedFile */
$output->writeln(" " . $encryptedFile->getPath());
@@ -196,7 +196,7 @@ class OwnershipTransferService {
private function collectUsersShares(string $sourceUid,
OutputInterface $output): array {
- $output->writeln("Collecting all share information for files and folder of $sourceUid ...");
+ $output->writeln("Collecting all share information for files and folders of $sourceUid ...");
$shares = [];
$progress = new ProgressBar($output);
@@ -235,7 +235,7 @@ class OwnershipTransferService {
$finalTarget = $finalTarget . '/' . basename($sourcePath);
}
if ($view->rename($sourcePath, $finalTarget) === false) {
- throw new TransferOwnershipException("Could not transfer files", 1);
+ throw new TransferOwnershipException("Could not transfer files.", 1);
}
if (!is_dir("$sourceUid/files")) {
// because the files folder is moved away we need to recreate it