Skip to content

Commit b031e11

Browse files
committed
try for mkdir and windows
1 parent 952ad68 commit b031e11

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,13 @@ bool unpackFiles(std::string sDest)
271271
{
272272
std::cout << "Directory " << sDest << " does not exists. Try to create it." << std::endl;
273273

274-
// Try to create dir.
274+
// Try to create directory.
275+
// platform stuff...
276+
#if defined(_WIN32)
277+
if (_mkdir(sDest.c_str()) != 0)
278+
#else
275279
if (mkdir(sDest.c_str(), S_IRWXU | S_IXGRP | S_IRGRP | S_IROTH | S_IXOTH) != 0)
280+
#endif
276281
{
277282
std::cerr << "Can not create directory!!!" << std::endl;
278283
return false;

0 commit comments

Comments
 (0)