back to polygonf

git-svn-id: svn://db.shs.com.ru/pip@105 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-04-17 07:19:36 +00:00
parent 022b76bc29
commit 353dbedf77
25 changed files with 143 additions and 106 deletions

View File

@@ -487,7 +487,7 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info)
if (!info.perm_user.write) attr |= FILE_ATTRIBUTE_READONLY;
if (SetFileAttributes((LPCTSTR)(fp.data()), attr) == 0) {
piCout << "[PIFile] applyFileInfo: \"SetFileAttributes\" error:" << errorString();
return false;
//return false;
}
HANDLE hFile = 0;
if ((attr & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY) {
@@ -515,11 +515,11 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info)
if (info.perm_other.exec) mode |= S_IXOTH;
if (chmod(fp.data(), mode) != 0) {
piCout << "[PIFile] applyFileInfo: \"chmod\" error:" << errorString();
return false;
//return false;
}
if (chown(fp.data(), info.id_user, info.id_group) != 0) {
piCout << "[PIFile] applyFileInfo: \"chown\" error:" << errorString();
return false;
//return false;
}
struct timeval tm[2];
PISystemTime st = info.time_access.toSystemTime();
@@ -530,7 +530,7 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info)
tm[1].tv_usec = st.nanoseconds / 1000;
if (utimes(fp.data(), tm) != 0) {
piCout << "[PIFile] applyFileInfo: \"utimes\" error:" << errorString();
return false;
//return false;
}
#endif
return true;