Skip to content

Commit e7399e6

Browse files
committed
Fixes ownership issue with dock backup.
1 parent d108525 commit e7399e6

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ $command[] = new Command\DefaultApplicationCommand();
1515
$command[] = new Command\AdobeInfoCommand();
1616
$command[] = new Command\AdobeBackupCommand();
1717
$command[] = new Command\AdobeTransferCommand();
18-
$app = new Application('MacPrefer', 'v1.2.6');
18+
$app = new Application('MacPrefer', 'v1.2.7');
1919
$app->addCommands($command);
2020
$app->run();

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"email": "aaron@jonesicoding.com"
1515
}
1616
],
17-
"version": "1.2.6",
17+
"version": "1.2.7",
1818
"require": {
1919
"ext-json": "*",
2020
"ext-posix": "*",

dist/prefer.phar

367 Bytes
Binary file not shown.

src/Command/AbstractPreferConsole.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ protected function writeConfig()
158158
break;
159159
}
160160

161+
// Set Proper Ownership
162+
$owner = posix_getpwuid(fileowner($this->getUserLibraryDir()));
163+
$group = posix_getgrgid(filegroup($this->getUserLibraryDir()));
164+
chown($this->configFile, $owner['name']);
165+
chown(dirname($this->configFile), $owner['name']);
166+
chgrp($this->configFile, $group['name']);
167+
chgrp(dirname($this->configFile), $group['name']);
168+
161169
return $this;
162170
}
163171

0 commit comments

Comments
 (0)