diff --git a/stepmania/src/RageFile.cpp b/stepmania/src/RageFile.cpp index 94a3741728..1a025bd8f1 100644 --- a/stepmania/src/RageFile.cpp +++ b/stepmania/src/RageFile.cpp @@ -30,10 +30,14 @@ RageFile::RageFile( const RageFile &cpy ) CString RageFile::GetPath() const { - if ( !IsOpen() ) + if ( !IsOpen() ) return ""; - return m_File->GetDisplayPath(); + CString sRet = m_File->GetDisplayPath(); + if( sRet != "" ) + return sRet; + + return GetRealPath(); } bool RageFile::Open( const CString& path, int mode ) diff --git a/stepmania/src/RageFileDriver.h b/stepmania/src/RageFileDriver.h index cf5d1b4431..f578f9f90a 100644 --- a/stepmania/src/RageFileDriver.h +++ b/stepmania/src/RageFileDriver.h @@ -34,12 +34,11 @@ protected: class RageFileObj { protected: - RageFile &parent; void SetError( const CString &sErr ) { m_sError = sErr; } CString m_sError; public: - RageFileObj( RageFile &p ): parent(p) { } + RageFileObj( RageFile &p ) { } virtual ~RageFileObj() { } CString GetError() const { return m_sError; } @@ -47,7 +46,7 @@ public: virtual int Seek( int offset ) = 0; virtual int GetFileSize() = 0; - virtual CString GetDisplayPath() const { return parent.GetRealPath(); } + virtual CString GetDisplayPath() const { return ""; } /* Raw I/O: */ virtual int Read(void *buffer, size_t bytes) = 0;