no chdir2

pull/152/head
x86kernel 10 years ago
parent a0a0a5eb6d
commit 7fb7259b3b

@ -215,7 +215,8 @@ public:
if(r)
{
#ifdef _WIN32
//not yet
if(os::get_lasterror() != ERROR_ALREADY_EXISTS)
return r;
#else
if(os::get_lasterror() != EEXIST)
return r;

@ -133,7 +133,7 @@ constexpr inline unsigned short eol_size()
inline int get_lasterror()
{
#ifdef _WIN32
//not yet
return GetLastError();
#else
return errno;
#endif
@ -142,7 +142,7 @@ inline int get_lasterror()
inline bool _mkdir(const std::string& dirname)
{
#ifdef _WIN32
//not yet
return CreateDirectoryA(dirname.c_str(), NULL) == 0;
#else
return mkdir(dirname.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
#endif

Loading…
Cancel
Save