Correctly handle symlink location display when browsing user share. Had to change

the name of our shfs location extended attributes:
user.LOCATION  -> system.LOCATION
user.LOCATIONS -> system.LOCATIONS
This commit is contained in:
Tom Mortensen
2016-07-16 13:07:07 -07:00
parent 815a2f6fab
commit be66f4f607
3 changed files with 3 additions and 3 deletions

View File

@@ -228,7 +228,7 @@ function autov($file) {
}
function transpose_user_path($path) {
if (strpos($path, '/mnt/user/') === 0 && file_exists($path)) {
$realdisk = trim(shell_exec("getfattr --absolute-names --only-values -n user.LOCATION ".escapeshellarg($path)." 2>/dev/null"));
$realdisk = trim(shell_exec("getfattr --absolute-names --only-values -n system.LOCATION ".escapeshellarg($path)." 2>/dev/null"));
if (!empty($realdisk))
$path = str_replace('/mnt/user/', "/mnt/$realdisk/", $path);
}