diff options
author | Travis Howell | 2006-05-01 08:24:57 +0000 |
---|---|---|
committer | Travis Howell | 2006-05-01 08:24:57 +0000 |
commit | 7b7d29067508ad8a6c8115dec10e98ae2092b5a5 (patch) | |
tree | 4c4ef8e63e37e776e746919c30d1cd75aa2eef03 /backends | |
parent | ff7955f4d3124a1c736a7a883e5bcc66f533e193 (diff) | |
download | scummvm-rg350-7b7d29067508ad8a6c8115dec10e98ae2092b5a5.tar.gz scummvm-rg350-7b7d29067508ad8a6c8115dec10e98ae2092b5a5.tar.bz2 scummvm-rg350-7b7d29067508ad8a6c8115dec10e98ae2092b5a5.zip |
Add windows code for AbstractFilesystemNode::child()
svn-id: r22253
Diffstat (limited to 'backends')
-rw-r--r-- | backends/fs/windows/windows-fs.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp index dc9be3667b..aeeecd5d43 100644 --- a/backends/fs/windows/windows-fs.cpp +++ b/backends/fs/windows/windows-fs.cpp @@ -230,7 +230,19 @@ AbstractFilesystemNode *WindowsFilesystemNode::parent() const { } AbstractFilesystemNode *WindowsFilesystemNode::child(const String &name) const { - TODO + assert(_isDirectory); + String newPath(_path); + if (_path.lastChar() != '\\') + newPath += '\\'; + newPath += name; + + // Check whether the directory actually exists + DWORD fileAttribs = GetFileAttributes(toUnicode(newPath.c_str())); + if (fileAttribs == 0xffffffff) + return 0; + + WindowsFilesystemNode *p = new WindowsFilesystemNode(newPath); + return p; } #endif // WIN32 |