Index: util/file/basename_win.cc |
diff --git a/test/scoped_temp_dir.cc b/util/file/basename_win.cc |
similarity index 74% |
copy from test/scoped_temp_dir.cc |
copy to util/file/basename_win.cc |
index 5c151cc0057d69699fe38ed8380c59ca4d336651..1e8e801a96bb7f1fe298b812f6c539c935a96461 100644 |
--- a/test/scoped_temp_dir.cc |
+++ b/util/file/basename_win.cc |
@@ -12,17 +12,15 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "test/scoped_temp_dir.h" |
+#include "util/file/basename.h" |
namespace crashpad { |
-namespace test { |
-ScopedTempDir::ScopedTempDir() : path_(CreateTemporaryDirectory()) { |
+std::string Basename(const std::string& path) { |
+ char fname[_MAX_FNAME]; |
+ char ext[_MAX_EXT]; |
+ _splitpath(path.c_str(), nullptr, nullptr, fname, ext); |
Mark Mentovai
2015/05/04 21:21:59
Compatibility test between basename() and _splitpa
scottmg
2015/05/05 19:26:22
Deleted.
|
+ return std::string(fname) + std::string(ext); |
} |
-ScopedTempDir::~ScopedTempDir() { |
- RecursivelyDeleteTemporaryDirectory(path()); |
-} |
- |
-} // namespace test |
} // namespace crashpad |