diff --git a/Dir.cpp b/Dir.cpp index baeda34..3165fb1 100644 --- a/Dir.cpp +++ b/Dir.cpp @@ -955,9 +955,7 @@ TInt RDir::open(const char *a_pccPattern) void RDir::close() { - /* Free the contents of the TEntry array in case it the RDir class is reused */ - - m_entries.Purge(); + RDirObject::close(); #ifdef __amigaos__ diff --git a/Dir.h b/Dir.h index 85d92b1..19a904a 100644 --- a/Dir.h +++ b/Dir.h @@ -135,7 +135,12 @@ class RDirObject virtual TInt open(const char *a_pattern) = 0; - virtual void close() = 0; + virtual void close() + { + /* Free the contents of the TEntry array in case the RDir class is reused */ + + m_entries.Purge(); + } virtual TInt read(TEntryArray *&a_entries, enum TDirSortOrder a_sortOrder = EDirSortNone) = 0; }; diff --git a/RemoteDir.h b/RemoteDir.h index a6b30ca..0f2f308 100644 --- a/RemoteDir.h +++ b/RemoteDir.h @@ -25,8 +25,6 @@ class RRemoteDir : public RDirObject int open(const char *a_pattern); - void close() { } - int read(TEntryArray *&a_entries, enum TDirSortOrder a_sortOrder = EDirSortNone); void setFactory(RRemoteFactory *a_remoteFactory) { m_remoteFactory = a_remoteFactory; } diff --git a/RemoteFileUtils.cpp b/RemoteFileUtils.cpp index 898a251..42f71ab 100644 --- a/RemoteFileUtils.cpp +++ b/RemoteFileUtils.cpp @@ -163,7 +163,7 @@ int RRemoteFileUtils::deleteFile(const char *a_fileName) int RRemoteFileUtils::getFileInfo(const char *a_fileName, TEntry *a_entry) { - ASSERTM((a_entry != nullptr), "RRemoteFileUtils::getFileInfo() => Pointer to filename passed in must not be NULL"); + ASSERTM((a_fileName!= nullptr), "RRemoteFileUtils::getFileInfo() => Pointer to filename passed in must not be NULL"); ASSERTM((a_entry != nullptr), "RRemoteFileUtils::getFileInfo() => TEntry structure passed in must not be NULL"); RSocket socket;