diff --git a/toolbox/os.cpp b/toolbox/os.cpp index 2451e88..b7fd8d8 100644 --- a/toolbox/os.cpp +++ b/toolbox/os.cpp @@ -364,9 +364,9 @@ namespace OS } else { - auto &e = OS::Internal::FDEntry::allocate(fd, sname); - e.resource = false; - e.text = IsTextFile(sname); + auto &e = OS::Internal::FDEntry::allocate(fd, std::move(xname)); + e.resource = rf; + e.text = rf ? false : IsTextFile(sname); d0 = 0; memoryWriteWord(fd, parm + 24);