From a9553a11b5005d86d051754065eb71c3f98baad2 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Mon, 25 Feb 2013 20:40:57 -0500 Subject: [PATCH] keep file name when opening --- mpw/mpw_access.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpw/mpw_access.cpp b/mpw/mpw_access.cpp index 04f8e5f..22d938c 100644 --- a/mpw/mpw_access.cpp +++ b/mpw/mpw_access.cpp @@ -68,6 +68,7 @@ namespace MPW sname = ToolBox::ReadCString(name, true); + std::string xname = sname; Log(" open(%s, %04x)\n", sname.c_str(), f.flags); @@ -104,7 +105,7 @@ namespace MPW if (f.flags & kO_RSRC) f.flags |= kO_BINARY; - auto &e = OS::Internal::FDEntry::allocate(fd); + auto &e = OS::Internal::FDEntry::allocate(fd, std::move(xname)); e.text = !(f.flags & kO_BINARY); e.resource = f.flags & kO_RSRC; }