From b38e2e25f1baf0fbac5766a37b6e01de2bdc00a7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 9 Dec 2004 11:31:23 +0000 Subject: [PATCH] remove parent --- stepmania/src/RageFile.cpp | 8 ++++++-- stepmania/src/RageFileDriver.h | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) 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;