git-svn-id: svn://db.shs.com.ru/pip@731 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-02-08 14:48:41 +00:00
parent 4b2272d891
commit 08d35cbdb1
2 changed files with 6 additions and 0 deletions

View File

@@ -400,9 +400,13 @@ PIDir PIDir::home() {
s.prepend(separator); s.prepend(separator);
return PIDir(s); return PIDir(s);
#else #else
# ifndef ESP_PLATFORM
rc = getenv("HOME"); rc = getenv("HOME");
if (rc == 0) return PIDir(); if (rc == 0) return PIDir();
return PIDir(rc); return PIDir(rc);
# else
return PIDir();
# endif
#endif #endif
} }

View File

@@ -724,6 +724,7 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info)
} }
CloseHandle(hFile); CloseHandle(hFile);
#else #else
#ifndef ESP_PLATFORM
int mode(0); int mode(0);
if (info.perm_user.read) mode |= S_IRUSR; if (info.perm_user.read) mode |= S_IRUSR;
if (info.perm_user.write) mode |= S_IWUSR; if (info.perm_user.write) mode |= S_IWUSR;
@@ -753,6 +754,7 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info)
piCout << "[PIFile] applyFileInfo: \"utimes\" error:" << errorString(); piCout << "[PIFile] applyFileInfo: \"utimes\" error:" << errorString();
//return false; //return false;
} }
#endif
#endif #endif
return true; return true;
} }