diff --git a/tools/proftp.php b/tools/proftp.php index ecd877f5..b129c39d 100644 --- a/tools/proftp.php +++ b/tools/proftp.php @@ -37,7 +37,7 @@ $row = pg_fetch_array($result, $ri); $content.='# path: '.$row['path']."\n"; $content.='mkdir -p "/home/ftp/westdc_'.$row['userid'].'/'.basename($row['path']).'"'."\n"; - $content.='mount --bind "'.$row['path'].'" "/home/ftp/westdc_'.$row['userid'].'/'.basename($row['path']).'"'."\n"; + $content.='mount --bind "'.$row['path'].'" "/home/ftp/westdc_'.$row['userid'].'/'.preg_replace('/^.+[\\\\\\/]/', '', $row['path']).'"'."\n"; } $filename='./proftp-user.sh'; if (!empty($content)) @@ -53,4 +53,8 @@ } pg_free_result($result); pg_close($link); + function get_basename($filename) +{ + return ; +} ?> \ No newline at end of file