Ignore:
Timestamp:
Jan 9, 2017, 11:09:38 AM (2 years ago)
Author:
jrpelegrina
Message:

Update new version: 3.15.02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • filezilla/trunk/fuentes/src/interface/LocalListView.cpp

    r130 r3185  
    2020#include "dragdropmanager.h"
    2121#include "drop_target_ex.h"
    22 #include "local_filesys.h"
    2322#include "filelist_statusbar.h"
    2423#include "sizeformatting.h"
    2524#include "timeformatting.h"
     25
     26#include <libfilezilla/local_filesys.hpp>
     27#include <libfilezilla/recursive_remove.hpp>
    2628
    2729class CLocalListViewDropTarget : public CScrollableDropTarget<wxListCtrlEx>
     
    305307bool CLocalListView::DisplayDir(CLocalPath const& dirname)
    306308{
     309       
    307310        CancelLabelEdit();
    308311
     
    372375#endif
    373376                CFilterManager filter;
    374                 CLocalFileSystem local_filesystem;
    375 
    376                 if (!local_filesystem.BeginFindFiles(m_dir.GetPath(), false)) {
     377                fz::local_filesys local_filesys;
     378
     379                if (!local_filesys.begin_find_files(fz::to_native(m_dir.GetPath()), false)) {
    377380                        SetItemCount(1);
    378381                        return false;
     
    388391                CLocalFileData data;
    389392                bool wasLink;
    390                 while (local_filesystem.GetNextFile(data.name, wasLink, data.dir, &data.size, &data.time, &data.attributes)) {
    391                         if (data.name.empty()) {
     393                fz::native_string name;
     394                while (local_filesys.get_next_file(name, wasLink, data.dir, &data.size, &data.time, &data.attributes)) {
     395                        if (name.empty()) {
    392396                                wxGetApp().DisplayEncodingWarning();
    393397                                continue;
    394398                        }
    395399
     400                        data.name = name;
    396401                        m_fileData.push_back(data);
    397402                        if (!filter.FilenameFiltered(data.name, m_dir.GetPath(), data.dir, data.size, true, data.attributes, data.time)) {
     
    928933void CLocalListView::OnMenuDelete(wxCommandEvent&)
    929934{
    930         std::list<wxString> pathsToDelete;
     935        std::list<fz::native_string> pathsToDelete;
    931936        long item = -1;
    932937        while ((item = GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED)) != -1) {
     
    941946                        continue;
    942947
    943                 pathsToDelete.push_back(m_dir.GetPath() + data->name);
    944         }
    945         if (!CLocalFileSystem::RecursiveDelete(pathsToDelete, this))
    946                 wxGetApp().DisplayEncodingWarning();
     948                pathsToDelete.push_back(fz::to_native(m_dir.GetPath() + data->name));
     949        }
     950        gui_recursive_remove rmd(this);
     951        rmd.remove(pathsToDelete);
    947952
    948953        m_pState->SetLocalDir(m_dir);
     
    13161321
    13171322        bool wasLink;
    1318         enum CLocalFileSystem::local_fileType type = CLocalFileSystem::GetFileInfo(m_dir.GetPath() + file, wasLink, &data.size, &data.time, &data.attributes);
    1319         if (type == CLocalFileSystem::unknown)
     1323        enum fz::local_filesys::type type = fz::local_filesys::get_file_info(fz::to_native(m_dir.GetPath() + file), wasLink, &data.size, &data.time, &data.attributes);
     1324        if (type == fz::local_filesys::unknown)
    13201325                return;
    13211326
    13221327        data.name = file;
    1323         data.dir = type == CLocalFileSystem::dir;
     1328        data.dir = type == fz::local_filesys::dir;
    13241329
    13251330        CFilterManager filter;
     
    14971502}
    14981503
    1499 bool CLocalListView::GetNextFile(wxString& name, bool& dir, int64_t& size, CDateTime& date)
     1504bool CLocalListView::get_next_file(wxString& name, bool& dir, int64_t& size, fz::datetime& date)
    15001505{
    15011506        if (++m_comparisonIndex >= (int)m_originalIndexMapping.size())
Note: See TracChangeset for help on using the changeset viewer.