COMMON: Access mac res fork via FSNode instead of StdioStream

This fixes linker problems with the unit tests on Mac OS X. it is also
"more proper" to use the high-level FSNode API. StdioStream is a
(relatively) low-level wrapper intended for use inside of backends only.
This commit is contained in:
Max Horn 2011-06-03 17:30:30 +02:00
parent 11bd6da595
commit 3cc2e5b927

View File

@ -32,7 +32,6 @@
#ifdef MACOSX
#include "common/config-manager.h"
#include "backends/fs/stdiostream.h"
#endif
namespace Common {
@ -108,7 +107,7 @@ bool MacResManager::open(String filename) {
#ifdef MACOSX
// Check the actual fork on a Mac computer
String fullPath = ConfMan.get("path") + "/" + filename + "/..namedfork/rsrc";
SeekableReadStream *macResForkRawStream = StdioStream::makeFromPath(fullPath, false);
SeekableReadStream *macResForkRawStream = FSNode(fullPath).createReadStream();;
if (macResForkRawStream && loadFromRawFork(*macResForkRawStream)) {
_baseFileName = filename;
@ -168,7 +167,7 @@ bool MacResManager::open(FSNode path, String filename) {
#ifdef MACOSX
// Check the actual fork on a Mac computer
String fullPath = path.getPath() + "/" + filename + "/..namedfork/rsrc";
SeekableReadStream *macResForkRawStream = StdioStream::makeFromPath(fullPath, false);
SeekableReadStream *macResForkRawStream = FSNode(fullPath).createReadStream();
if (macResForkRawStream && loadFromRawFork(*macResForkRawStream)) {
_baseFileName = filename;