mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
fix: Fix regex in File Manager to support hyphenated usernames and groups (#516)
This commit is contained in:
parent
4b8e798e66
commit
b2440586d6
@ -103,7 +103,7 @@ public static function parse(User $user, Server $server, string $path, string $s
|
|||||||
array_shift($lines);
|
array_shift($lines);
|
||||||
|
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
if (preg_match('/^([drwx\-]+)\s+(\d+)\s+(\w+)\s+(\w+)\s+(\d+)\s+([\w\s:\-]+)\s+(.+)$/', $line, $matches)) {
|
if (preg_match('/^([drwx\-]+)\s+(\d+)\s+([\w\-]+)\s+([\w\-]+)\s+(\d+)\s+([\w\s:\-]+)\s+(.+)$/', $line, $matches)) {
|
||||||
$type = match ($matches[1][0]) {
|
$type = match ($matches[1][0]) {
|
||||||
'-' => 'file',
|
'-' => 'file',
|
||||||
'd' => 'directory',
|
'd' => 'directory',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user