Bug: GetFiles

Discussion and help for Easy Save 3
Post Reply
RequiemOfTheSun
Posts: 14
Joined: Tue Dec 29, 2020 4:14 am

Bug: GetFiles

Post by RequiemOfTheSun »

Hi, after updating to latest I believe there is a bug in ES3IO.cs file.

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.
Sounds good but GetDirectoryPath ignores trailing slashes, so when given a directory, GetFiles now searches the parent to that directory.

Code: Select all

// Ignore trailing slash if necessary.
if (slash == (path.Length - 1))
	slash = path.Substring(0, slash).LastIndexOf(slashChar);
I've just removed GetDirectoryPath from GetFiles to get it working but wanted to give a heads up.

Thanks
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Bug: GetFiles

Post by Joel »

Thanks for the heads-up, much appreciated. This will be resolved in the next update.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply