Commit 44515e38 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #632 in ZP/z-push from...

Merge pull request #632 in ZP/z-push from bugfix/ZP-1294-FixFileOwner-on-Windows-without-posix_getuid to develop

* commit '61ceebbf':
  ZP-1294 Skip FixFileOwner() if posix subsystem is not available.
parents a205e23e 61ceebbf
...@@ -885,7 +885,11 @@ class Utils { ...@@ -885,7 +885,11 @@ class Utils {
* @return boolean * @return boolean
*/ */
public static function FixFileOwner($file) { public static function FixFileOwner($file) {
if(posix_getuid() == 0 && is_file($file)) { if (!function_exists('posix_getuid')) {
ZLog::Write(LOGLEVEL_DEBUG, "Utils::FixeFileOwner(): Posix subsystem not available, skipping.");
return false;
}
if (posix_getuid() == 0 && is_file($file)) {
$dir = dirname($file); $dir = dirname($file);
$perm_dir = stat($dir); $perm_dir = stat($dir);
$perm_file = stat($file); $perm_file = stat($file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment