On function GetFiles() you've added this note and a call to GetDirectoryPath().
Code: Select all
// Note: Paths not ending in a slash are assumed to be a path to a file.
// In this case the Directory containing the file will be searched.
Code: Select all
// Ignore trailing slash if necessary.
if (slash == (path.Length - 1))
slash = path.Substring(0, slash).LastIndexOf(slashChar);
Thanks