diff --git a/Common/FileDownloader/FileDownloader_curl.cpp b/Common/FileDownloader/FileDownloader_curl.cpp index 6c98741ba3..e2f88c0b3f 100644 --- a/Common/FileDownloader/FileDownloader_curl.cpp +++ b/Common/FileDownloader/FileDownloader_curl.cpp @@ -217,7 +217,10 @@ public : if (m_sFilePath.empty()) m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length()); else - NSFile::CFileBinary::Move(UTF8_TO_U(sOut), m_sFilePath); + { + NSFile::CFileBinary file; + file.Move(UTF8_TO_U(sOut), m_sFilePath); + } } //int nRes = execl("/usr/bin/wget", stringWstingToUtf8String (m_sFileUrl).c_str(), "-P", stringWstingToUtf8String (m_sFilePath).c_str(), (char *)NULL); //m_bComplete = nRes >= 0; diff --git a/DesktopEditor/common/Directory.cpp b/DesktopEditor/common/Directory.cpp index beadfc16bc..c97ab6016a 100644 --- a/DesktopEditor/common/Directory.cpp +++ b/DesktopEditor/common/Directory.cpp @@ -403,6 +403,7 @@ namespace NSDirectory NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strSrc.c_str(), strSrc.length(), pUtf8, lLen, false); DIR *dp; struct dirent *dirp; + NSFile::CFileBinary file; if((dp = opendir((char*)pUtf8)) != NULL) { while ((dirp = readdir(dp)) != NULL) @@ -427,7 +428,7 @@ namespace NSDirectory if (2 == nType) { std::wstring sName = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)dirp->d_name, strlen(dirp->d_name)); - NSFile::CFileBinary::Copy(strSrc + L"/" + sName, strDst + L"/" + sName); + file.Copy(strSrc + L"/" + sName, strDst + L"/" + sName); } if (bIsRecursion && (1 == nType)) @@ -451,6 +452,9 @@ namespace NSDirectory NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strSrc.c_str(), strSrc.length(), pUtf8, lLen, false); DIR *dp; struct dirent *dirp; + + NSFile::CFileBinary file; + if((dp = opendir((char*)pUtf8)) != NULL) { while ((dirp = readdir(dp)) != NULL) @@ -458,7 +462,7 @@ namespace NSDirectory if(DT_REG == dirp->d_type) { std::wstring sName = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)dirp->d_name, strlen(dirp->d_name)); - NSFile::CFileBinary::Copy(strSrc + L"/" + sName, strDst + L"/" + sName); + file.Copy(strSrc + L"/" + sName, strDst + L"/" + sName); } if (bIsRecursion && DT_DIR == dirp->d_type)