summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-15 00:08:09 +0100
committerGitHub <noreply@github.com>2016-11-15 00:08:09 +0100
commite5b61527da9a193aaea13cad7a3cf5f1e003731f (patch)
tree8deec40adf199823ab3ccdc55efed20f1f0f1aa8 /apps/files/lib
parentd5afe2f3caf1b013a98cdea72e75fe25d6ed4011 (diff)
parent1355f2039e4bbeb7e24cd27992b7562d647db0eb (diff)
downloadnextcloud-server-e5b61527da9a193aaea13cad7a3cf5f1e003731f.tar.gz
nextcloud-server-e5b61527da9a193aaea13cad7a3cf5f1e003731f.zip
Merge pull request #2125 from nextcloud/downstream-26546
Transfer ownership now returns exit code on error
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Command/TransferOwnership.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php
index cd776aaa4ef..022db999200 100644
--- a/apps/files/lib/Command/TransferOwnership.php
+++ b/apps/files/lib/Command/TransferOwnership.php
@@ -96,12 +96,12 @@ class TransferOwnership extends Command {
if (!$sourceUserObject instanceof IUser) {
$output->writeln("<error>Unknown source user $this->sourceUser</error>");
- return;
+ return 1;
}
if (!$destinationUserObject instanceof IUser) {
$output->writeln("<error>Unknown destination user $this->destinationUser</error>");
- return;
+ return 1;
}
$this->sourceUser = $sourceUserObject->getUID();
@@ -110,7 +110,7 @@ class TransferOwnership extends Command {
// target user has to be ready
if (!\OC::$server->getEncryptionManager()->isReadyForUser($this->destinationUser)) {
$output->writeln("<error>The target user is not ready to accept files. The user has at least to be logged in once.</error>");
- return;
+ return 2;
}
$date = date('c');