KnossosNET / Knossos.NET

Repository for the Knossos.NET launcher, currently in development.
GNU General Public License v3.0
25 stars 10 forks source link

tweak disk space check to use exact directory if possible #43

Closed notimaginative closed 10 months ago

notimaginative commented 10 months ago

FileInfo(x).Directory returns the parent directory of x. If x is already a directory then it moves up a level, possibly changing mount points on *nix systems and giving incorrect values. So use full path of x if it's a directory and parent of x otherwise.

notimaginative commented 10 months ago

I think this is correct based on the documentation, but you may want to check me on it. Tested on mac, Linux, and Windows and it appeared to work properly on all three. My Windows setup is pretty basic however so I can't say for sure it's 100% there.

Shivansps commented 10 months ago

Looks good to me.