* Filemanager: fix not working changing owner or group of a file/directory (as root!)

This commit is contained in:
Ralf Becker 2016-08-12 09:29:40 +02:00
parent d9297ca193
commit a49627c850

View File

@ -2337,7 +2337,7 @@ class Vfs
*/ */
static function chown($path,$owner) static function chown($path,$owner)
{ {
return $path[0] == '/' && chown(self::PREFIX.$path, $owner); return $path[0] == '/' && chown(self::PREFIX.$path, is_numeric($owner) ? abs($owner) : $owner);
} }
/** /**
@ -2351,7 +2351,7 @@ class Vfs
*/ */
static function chgrp($path,$group) static function chgrp($path,$group)
{ {
return $path[0] == '/' && chgrp(self::PREFIX.$path, $group); return $path[0] == '/' && chgrp(self::PREFIX.$path, is_numeric($group) ? abs($group) : $group);
} }
/** /**