mirror of https://github.com/stella-emu/stella.git
Implement handling of current working directory in Windows FSNode class.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2510 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
b0c1fb9d9f
commit
5bd54cb684
|
@ -247,10 +247,18 @@ WindowsFilesystemNode::WindowsFilesystemNode(const string& p)
|
|||
// Expand '.\' to the current working directory,
|
||||
// likewise if the path is relative (second character not a colon)
|
||||
else if ((p.length() >= 2 && ((p[0] == '.' && p[1] == '\\') ||
|
||||
p[1] != ':'))
|
||||
p[1] != ':')))
|
||||
{
|
||||
// TODO - implement this
|
||||
_path = p;
|
||||
char buf[4096];
|
||||
if(GetCurrentDirectory(4096, buf) > 0)
|
||||
_path = buf;
|
||||
|
||||
if(p[0] == '.')
|
||||
// Skip over the tilde/dot. We know that p contains at least
|
||||
// two chars, so this is safe:
|
||||
_path = _path + (p.c_str() + 1);
|
||||
else
|
||||
_path = _path + '\\' + p;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue