diff options
Diffstat (limited to 'lib/UnrarXLib')
-rw-r--r-- | lib/UnrarXLib/file.cpp | 4 | ||||
-rw-r--r-- | lib/UnrarXLib/file.hpp | 7 | ||||
-rw-r--r-- | lib/UnrarXLib/rar.cpp | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/UnrarXLib/file.cpp b/lib/UnrarXLib/file.cpp index ecc9047888..4d9860d00f 100644 --- a/lib/UnrarXLib/file.cpp +++ b/lib/UnrarXLib/file.cpp @@ -3,6 +3,7 @@ // BE WARNED THIS FILE IS HEAVILY MODIFIED TO BE USED WITH XBMC #include "filesystem/Directory.h" +#include "filesystem/File.h" #include "Util.h" #include "utils/URIUtils.h" @@ -10,6 +11,8 @@ static int RemoveCreatedActive=0; File::File() + : m_File(*(new XFILE::CFile())) + { // hFile=BAD_HANDLE; *FileName=0; @@ -35,6 +38,7 @@ File::~File() else Close();*/ m_File.Close(); + delete &m_File; } diff --git a/lib/UnrarXLib/file.hpp b/lib/UnrarXLib/file.hpp index 2921c72553..5eca0053ca 100644 --- a/lib/UnrarXLib/file.hpp +++ b/lib/UnrarXLib/file.hpp @@ -9,8 +9,6 @@ typedef FILE* FileHandle; #define BAD_HANDLE NULL #endif -#include "filesystem/File.h" - class RAROptions; enum FILE_HANDLETYPE {FILE_HANDLENORMAL,FILE_HANDLESTD,FILE_HANDLEERR}; @@ -25,6 +23,9 @@ struct FileStat bool IsDir; }; +namespace XFILE { + class CFile; +}; class File { @@ -33,7 +34,7 @@ class File void AddFileToList(); //FileHandle hFile; - XFILE::CFile m_File; + XFILE::CFile &m_File; bool LastWrite; FILE_HANDLETYPE HandleType; diff --git a/lib/UnrarXLib/rar.cpp b/lib/UnrarXLib/rar.cpp index 501a6095a4..a0e34d99eb 100644 --- a/lib/UnrarXLib/rar.cpp +++ b/lib/UnrarXLib/rar.cpp @@ -2,6 +2,7 @@ #include "UnrarX.hpp" #include "guilib/GUIWindowManager.h" #include "dialogs/GUIDialogProgress.h" +#include "filesystem/File.h" #include "smallfn.cpp" |