Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when retrieve symlinkatrributes at directory symlink #157

Open
robertlzj opened this issue May 12, 2022 · 1 comment
Open

error when retrieve symlinkatrributes at directory symlink #157

robertlzj opened this issue May 12, 2022 · 1 comment

Comments

@robertlzj
Copy link

Hi,

local lfs=require'lfs'
print(lfs._VERSION)--1.8.0
local file1,file2='test_directory','symlink-directory'
assert(not lfs.attributes(file1) and not  lfs.attributes(file2))
lfs.mkdir(file1)
lfs.link(file1,file2,true)
assert(lfs.symlinkattributes(file2,'target')=="Input/output error")--should be path
assert(not pcall(lfs.symlinkattributes,file2))--should not raise error 'attempt to index a nil value'
return 

works correct on file.

Windows 10 x64

@cevhyruz
Copy link

cevhyruz commented Jun 8, 2023

Same. I don't know if it's intended but target field only exists on broken symlinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants