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/xmlfunctions.cpp

    r130 r3185  
    77#include <wx/base64.h>
    88
    9 #include <local_filesys.h>
     9#include <libfilezilla/local_filesys.hpp>
    1010
    1111CXmlFile::CXmlFile(wxString const& fileName, wxString const& root)
     
    2121        wxASSERT(!name.empty());
    2222        m_fileName = name;
    23         m_modificationTime = CDateTime();
     23        m_modificationTime = fz::datetime();
    2424}
    2525
     
    5252                if (!m_element) {
    5353                        // Loading backup failed. If both original and backup file are empty, create new file.
    54                         if (CLocalFileSystem::GetSize(redirectedName) <= 0 && CLocalFileSystem::GetSize(redirectedName + _T("~")) <= 0) {
     54                        if (fz::local_filesys::get_size(fz::to_native(redirectedName)) <= 0 && fz::local_filesys::get_size(fz::to_native(redirectedName + _T("~"))) <= 0) {
    5555                                m_error.clear();
    5656                                CreateEmpty();
    57                                 m_modificationTime = CLocalFileSystem::GetModificationTime(redirectedName);
     57                                m_modificationTime = fz::local_filesys::get_modification_time(fz::to_native(redirectedName));
    5858                                return m_element;
    5959                        }
     
    8686        }
    8787
    88         m_modificationTime = CLocalFileSystem::GetModificationTime(redirectedName);
     88        m_modificationTime = fz::local_filesys::get_modification_time(fz::to_native(redirectedName));
    8989        return m_element;
    9090}
     
    9494        wxCHECK(!m_fileName.empty(), false);
    9595
    96         if (!m_modificationTime.IsValid())
     96        if (!m_modificationTime.empty())
    9797                return true;
    9898
    99         CDateTime const modificationTime = CLocalFileSystem::GetModificationTime(m_fileName);
    100         if (modificationTime.IsValid() && modificationTime == m_modificationTime)
     99        fz::datetime const modificationTime = fz::local_filesys::get_modification_time(fz::to_native(m_fileName));
     100        if (modificationTime.empty() && modificationTime == m_modificationTime)
    101101                return false;
    102102
     
    139139
    140140        bool res = SaveXmlFile();
    141         m_modificationTime = CLocalFileSystem::GetModificationTime(m_fileName);
     141        m_modificationTime = fz::local_filesys::get_modification_time(fz::to_native(m_fileName));
    142142
    143143        if (!res && printError) {
     
    286286        Close();
    287287
    288         if (CLocalFileSystem::GetSize(file) <= 0) {
     288        if (fz::local_filesys::get_size(fz::to_native(file)) <= 0) {
    289289                return false;
    290290        }
     
    315315        wxString redirectedName = m_fileName;
    316316        bool isLink = false;
    317         if (CLocalFileSystem::GetFileInfo(m_fileName, isLink, 0, 0, 0) == CLocalFileSystem::file) {
     317        if (fz::local_filesys::get_file_info(fz::to_native(redirectedName), isLink, 0, 0, 0) == fz::local_filesys::file) {
    318318                if (isLink) {
    319                         CLocalPath target(CLocalFileSystem::GetSymbolicLinkTarget(m_fileName));
     319                        CLocalPath target(fz::local_filesys::get_link_target(fz::to_native(redirectedName)));
    320320                        if (!target.empty()) {
    321321                                redirectedName = target.GetPath();
     
    335335
    336336        wxString redirectedName = GetRedirectedName();
    337         if (CLocalFileSystem::GetFileInfo(redirectedName, isLink, 0, 0, &flags) == CLocalFileSystem::file) {
     337        if (fz::local_filesys::get_file_info(fz::to_native(redirectedName), isLink, 0, 0, &flags) == fz::local_filesys::file) {
    338338#ifdef __WXMSW__
    339339                if (flags & FILE_ATTRIBUTE_HIDDEN)
    340                         SetFileAttributes(redirectedName, flags & ~FILE_ATTRIBUTE_HIDDEN);
     340                        SetFileAttributes(redirectedName.c_str(), flags & ~FILE_ATTRIBUTE_HIDDEN);
    341341#endif
    342342
     
    690690        Close();
    691691        m_document.load_string(data);
    692         m_element = m_document.child(m_rootName);
     692        m_element = m_document.child(m_rootName.mb_str());
    693693        if (!m_element) {
    694694                Close();
Note: See TracChangeset for help on using the changeset viewer.