diff options
Diffstat (limited to 'backends/fs/windows')
| -rw-r--r-- | backends/fs/windows/windows-fs.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp index 56e77d2dfa..d37d2501d9 100644 --- a/backends/fs/windows/windows-fs.cpp +++ b/backends/fs/windows/windows-fs.cpp @@ -123,6 +123,13 @@ void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const c  AbstractFilesystemNode *AbstractFilesystemNode::getCurrentDirectory() {  	char path[MAX_PATH];  	GetCurrentDirectory(MAX_PATH, path); + +	// Add a trailing slash, if necessary. +	if (path[0] != 0) { +		if (path[strlen(path) - 1] != '\\') +			strcat(path, "\\"); +	} +  	return new WindowsFilesystemNode(path);  } | 
