mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-19 08:26:52 +02:00
fixed not working symlink creation
This commit is contained in:
parent
3db8d01007
commit
4be150c546
@ -718,30 +718,24 @@ class filemanager_ui
|
|||||||
return $ret." egw_vfs::symlink('$to','$path')";
|
return $ret." egw_vfs::symlink('$to','$path')";
|
||||||
|
|
||||||
case 'createdir':
|
case 'createdir':
|
||||||
$dst = egw_vfs::concat($dir, $selected[0]);
|
$dst = egw_vfs::concat($dir, is_array($selected) ? $selected[0] : $selected);
|
||||||
if (egw_vfs::mkdir($dst, null, STREAM_MKDIR_RECURSIVE))
|
if (egw_vfs::mkdir($dst, null, STREAM_MKDIR_RECURSIVE))
|
||||||
{
|
{
|
||||||
$arr['msg'] = lang("Directory successfully created.");
|
return lang("Directory successfully created.");
|
||||||
}
|
}
|
||||||
else
|
return lang("Error while creating directory.");
|
||||||
{
|
|
||||||
$arr['msg'] = lang("Error while creating directory.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'symlink': // symlink given file into current dir
|
case 'symlink': // symlink given file into current dir
|
||||||
$target = $selected[0];
|
$target = is_array($selected) ? $selected[0] : $selected;
|
||||||
$link = egw_vfs::concat($dir, egw_vfs::basename($target));
|
$link = egw_vfs::concat($dir, egw_vfs::basename($target));
|
||||||
$abs_target = $target[0] == '/' ? $target : egw_vfs::concat($dir, $target);
|
$abs_target = $target[0] == '/' ? $target : egw_vfs::concat($dir, $target);
|
||||||
if (!egw_vfs::stat($abs_target))
|
if (!egw_vfs::stat($abs_target))
|
||||||
{
|
{
|
||||||
$arr['msg'] = lang('Link target %1 not found!', egw_vfs::decodePath($abs_target));
|
return lang('Link target %1 not found!', egw_vfs::decodePath($abs_target));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
$arr['msg'] = egw_vfs::symlink($target,$link) ?
|
return egw_vfs::symlink($target,$link) ?
|
||||||
lang('Symlink to %1 created.',$target) :
|
lang('Symlink to %1 created.',$target) :
|
||||||
lang('Error creating symlink to target %1!',egw_vfs::decodePath($target));
|
lang('Error creating symlink to target %1!',egw_vfs::decodePath($target));
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
list($action, $settings) = explode('_', $action, 2);
|
list($action, $settings) = explode('_', $action, 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user