lua-users home
lua-l archive

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


On 24 September 2012 11:38, Leo Razoumov <slonik.az@gmail.com> wrote:
> On Sun, Sep 23, 2012 at 9:04 PM, Peter Cawley <lua@corsix.org> wrote:
>> 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.
>
> Be careful here. I-node numbers are unique only within a given
> file-system. If your files come from files residing on multiple
> partitions or/and mounted over NFS  the inode numbers could
> potentially clash.
>
> --Leo--
>

Whilst true this is not really a problem as the device has it's own ID
given at mount or boot time. See the st_dev field of struct stat.

Liam