part II of rewriting
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@635 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <errno.h>
|
||||
#include "cp.h"
|
||||
#include "core/misc.h"
|
||||
|
||||
#include "functions.h"
|
||||
|
||||
|
||||
namespace Fun
|
||||
@@ -67,15 +67,7 @@ return true;
|
||||
|
||||
bool Cp::ParseDir(long & dir_id, std::string & dir, std::string & file)
|
||||
{
|
||||
std::string * move_to = request->PostVar("to");
|
||||
|
||||
if( !move_to )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
}
|
||||
|
||||
int res = system->dirs.AnalyzePath(*move_to, dir_id, dir, file);
|
||||
int res = system->dirs.AnalyzePath(request->PostVar("to"), dir_id, dir, file);
|
||||
|
||||
if( res == 1 )
|
||||
request->status = WINIX_ERR_NO_ROOT_DIR;
|
||||
@@ -193,7 +185,7 @@ long Cp::CpDir(const Item & item, long dst_dir_id)
|
||||
{
|
||||
cp_temp.url = mv_file;
|
||||
mv_file.clear();
|
||||
system->PrepareUrl(cp_temp);
|
||||
functions->PrepareUrl(cp_temp);
|
||||
}
|
||||
|
||||
if( !cp_preserve_attr )
|
||||
@@ -240,7 +232,7 @@ void Cp::CpItemCheck(Item & item, bool redirect)
|
||||
if( !mv_file.empty() )
|
||||
{
|
||||
item.url = mv_file;
|
||||
system->PrepareUrl(item);
|
||||
functions->PrepareUrl(item);
|
||||
}
|
||||
|
||||
CpItem(item, mv_dir_id);
|
||||
|
Reference in New Issue
Block a user