Changeset 69753 in vbox for trunk/src/VBox/Frontends/VBoxBugReport
- Timestamp:
- Nov 19, 2017 2:27:58 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp
r69500 r69753 120 120 { 121 121 public: 122 VBRDir(const char *pcszPath) 123 124 int rc = RTDirOpenFiltered(&m_pDir, pcszPath, RTDIRFILTER_WINNT, 0);125 126 127 122 VBRDir(const char *pcszPath) : m_hDir(NIL_RTDIR) 123 { 124 int rc = RTDirOpenFiltered(&m_hDir, pcszPath, RTDIRFILTER_WINNT, 0); 125 if (RT_FAILURE(rc)) 126 throw RTCError(com::Utf8StrFmt("Failed to open directory '%s'\n", pcszPath)); 127 }; 128 128 ~VBRDir() 129 130 int rc = RTDirClose(m_pDir);131 132 129 { 130 int rc = RTDirClose(m_hDir); 131 AssertRC(rc); 132 }; 133 133 const char *next(void) 134 135 int rc = RTDirRead(m_pDir, &m_DirEntry, NULL);136 137 138 elseif (rc == VERR_NO_MORE_FILES)139 140 141 134 { 135 int rc = RTDirRead(m_hDir, &m_DirEntry, NULL); 136 if (RT_SUCCESS(rc)) 137 return m_DirEntry.szName; 138 if (rc == VERR_NO_MORE_FILES) 139 return NULL; 140 throw RTCError("Failed to read directory element\n"); 141 }; 142 142 143 143 private: 144 PRTDIR m_pDir;144 RTDIR m_hDir; 145 145 RTDIRENTRY m_DirEntry; 146 146 };
Note:
See TracChangeset
for help on using the changeset viewer.