diff --git a/UEFIDump/uefidump.cpp b/UEFIDump/uefidump.cpp index 3aca67b..a66631d 100644 --- a/UEFIDump/uefidump.cpp +++ b/UEFIDump/uefidump.cpp @@ -17,11 +17,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #ifdef WIN32 #include -#include - bool isExistOnFs(const UString & path) { struct _stat buf; return (_stat((const char*)path.toLocal8Bit(), &buf) == 0); @@ -35,6 +34,19 @@ bool changeDirectory(const UString & dir) { return (_chdir((const char*)dir.toLocal8Bit()) == 0); } #else +#include +bool isExistOnFs(const UString & path) { + struct stat buf; + return (stat((const char*)path.toLocal8Bit(), &buf) == 0); +} + +bool makeDirectory(const UString & dir) { + return (mkdir((const char*)dir.toLocal8Bit(), ACCESSPERMS) == 0); +} + +bool changeDirectory(const UString & dir) { + return (chdir((const char*)dir.toLocal8Bit()) == 0); +} #endif USTATUS UEFIDumper::dump(const UByteArray & buffer, const UString & inPath, const UString & guid) diff --git a/common/treemodel.h b/common/treemodel.h index f48fa39..84ee141 100644 --- a/common/treemodel.h +++ b/common/treemodel.h @@ -36,6 +36,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "types.h" #include "treeitem.h" +class TreeModel; + class UModelIndex { friend class TreeModel;