uikit #3

Merged
tomasz.sowa merged 69 commits from uikit into master 2021-02-16 19:52:36 +01:00
1 changed files with 9 additions and 5 deletions
Showing only changes of commit a9b9d0badf - Show all commits

View File

@ -584,12 +584,16 @@ bool Mv::MoveFileOrSymlink2(Item & src_file, const std::wstring & dst_path, bool
if( !ParseDir(dst_path, check_access) )
return false;
if( src_file.parent_id == out_dir_tab.back()->id )
if( out_has_file && src_file.parent_id == out_dir_tab.back()->id && src_file.url == out_item.url )
{
// actually out_filename is here empty
// because ParseDir() have been read it to out_item
if( out_filename.empty() || src_file.url == out_filename )
return true; // the same file -- there is nothing to do
return true; // the same file -- there is nothing to do
}
if( out_has_file )
{
log << log3 << "Mv: such file already exists (skipping)" << logend;
slog << logerror << T("mv_file_exists") << logend;
return false;
}
return MoveFileOrSymlink(src_file, out_dir_tab, out_filename);