Code: Select all
SFileListEntry entry;
entry.FullName = filename;
entry.IsDirectory = isDirectory;
// swap
entry.FullName.replace('\\', '/');
// remove trailing slash
if (entry.Name.lastChar() == '/')
{
entry.IsDirectory = true;
entry.Name[ entry.Name.size()-1] = 0;
entry.Name.validate();
}
Also the "swap" comment doesn't seem to belong there...