lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Sep 23, 2012 at 5:55 PM, Paul K <paulclinger@yahoo.com> wrote:
> I've converted both to lowercase on windows for now, but would like to
> know if this is the expected workaround. Ideally, I'd prefer getinfo
> to return a normalized path, rather than package.path + module name.

Case insensitivity is just one case of a file having multiple names.
All modern file systems (even on the Windows side) support symbolic
links, which are another case of multiple names. A general solution
isn't to compare (normalised) file paths, but compare the underlying
file numbers. On Linux, this would be comparing inodes. On Windows,
this is CreateFileA / GetFileInformationByHandle /
dwVolumeSerialNumber,nFileIndexHigh,nFileIndexLow.