implement GetGlobalComment
This commit is contained in:
@@ -90,7 +90,8 @@ bool RageFileDriverZip::ReadEndCentralRecord( int &iTotalEntries, int &iCentralD
|
|||||||
iTotalEntries = FileReading::read_16_le( *m_pZip, sError );
|
iTotalEntries = FileReading::read_16_le( *m_pZip, sError );
|
||||||
FileReading::read_32_le( *m_pZip, sError ); /* skip size of the central directory */
|
FileReading::read_32_le( *m_pZip, sError ); /* skip size of the central directory */
|
||||||
iCentralDirectoryOffset = FileReading::read_32_le( *m_pZip, sError );
|
iCentralDirectoryOffset = FileReading::read_32_le( *m_pZip, sError );
|
||||||
FileReading::read_16_le( *m_pZip, sError ); /* skip zipfile comment length */
|
int iCommentLength = FileReading::read_16_le( *m_pZip, sError );
|
||||||
|
m_sComment = FileReading::ReadString( *m_pZip, iCommentLength, sError );
|
||||||
|
|
||||||
if( sError != "" )
|
if( sError != "" )
|
||||||
{
|
{
|
||||||
@@ -357,11 +358,6 @@ void RageFileDriverZip::FlushDirCache( const RString &sPath )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RString RageFileDriverZip::GetGlobalComment() const
|
|
||||||
{
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2005 Glenn Maynard. All rights reserved.
|
* Copyright (c) 2003-2005 Glenn Maynard. All rights reserved.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include "RageFileDriver.h"
|
#include "RageFileDriver.h"
|
||||||
#include "RageThreads.h"
|
#include "RageThreads.h"
|
||||||
|
|
||||||
struct end_central_dir_record;
|
|
||||||
class RageFileDriverZip: public RageFileDriver
|
class RageFileDriverZip: public RageFileDriver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -40,7 +39,7 @@ public:
|
|||||||
};
|
};
|
||||||
const FileInfo *GetFileInfo( const RString &sPath ) const;
|
const FileInfo *GetFileInfo( const RString &sPath ) const;
|
||||||
|
|
||||||
RString GetGlobalComment() const;
|
RString GetGlobalComment() const { return m_sComment; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_bFileOwned;
|
bool m_bFileOwned;
|
||||||
@@ -49,6 +48,7 @@ private:
|
|||||||
vector<FileInfo *> m_pFiles;
|
vector<FileInfo *> m_pFiles;
|
||||||
|
|
||||||
RString m_sPath;
|
RString m_sPath;
|
||||||
|
RString m_sComment;
|
||||||
|
|
||||||
/* Open() must be threadsafe. Mutex access to "zip", since we seek
|
/* Open() must be threadsafe. Mutex access to "zip", since we seek
|
||||||
* around in it when reading files. */
|
* around in it when reading files. */
|
||||||
|
|||||||
Reference in New Issue
Block a user