X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Ffilesystem%2Fbyte_filer.cpp;h=0384d2ec74f8328506eef10d7176465d27d33439;hb=46db3e069f6346301f8d55a1d155a4904f18ec1e;hp=bc6779c4f0b0be0ef4da9fba650b3787fb62be7a;hpb=ee645ac983eb9508920a6d4526b72adf8fe74094;p=feisty_meow.git diff --git a/nucleus/library/filesystem/byte_filer.cpp b/nucleus/library/filesystem/byte_filer.cpp index bc6779c4..0384d2ec 100644 --- a/nucleus/library/filesystem/byte_filer.cpp +++ b/nucleus/library/filesystem/byte_filer.cpp @@ -29,7 +29,7 @@ #include #endif -//#define DEBUG_BYTE_FILER +#define DEBUG_BYTE_FILER // uncomment for noisy version of class. using namespace basis; @@ -88,19 +88,8 @@ bool byte_filer::open(const astring &fname, const astring &perms) close(); _auto_close = true; // reset since we know we're opening this. _filename->reset(fname); -#ifndef __WIN32__ _handle->fp = _filename->raw().t()? fopen(_filename->raw().s(), perms.s()) : NIL; -#else - _handle->fp = _filename->raw().t()? _wfopen((wchar_t *)(UTF16 *)transcode_to_utf16(_filename->raw()), - (wchar_t *)(UTF16 *)transcode_to_utf16(perms)) : NIL; - -#ifdef DEBUG_BYTE_FILER - if (!_handle->fp) - wprintf((wchar_t *)(UTF16 *)transcode_to_utf16("could not open: %ls\n"), - (wchar_t *)(UTF16 *)transcode_to_utf16(_filename->raw())); -#endif - -#endif + if (_handle->fp == NIL) return false; return good(); }