Closed robertlzj closed 4 years ago
The result of lfs.symlinkattributes(path)
and lfs.attributes(path)
is totally different in run mode and debug mode for symlink file.
lfs.symlinkattributes
should return property of symlink self which mode=='link'
, lfs.attributes
should return property of the source which mode='file'
etc.
path=[[G:\S.txt]]
attributes=lfs.attributes(path)
symlinkattributes=lfs.symlinkattributes(path)
print(attributes.mode,symlinkattributes.mode)
--[[
debug: file link
run: file file
]]
The result of debug one is correct.
Does lfs
conflict with IDE things in run mode?
I found the problem!
package.cpath
is different in run mode and debug mode.
In run mode, there is C:\Users\XXX\luaplus\Tools\JamPlus\bin\win32\lua\modules\?.dll;
at the front, which has lfs.dll
of an old version.
When run script
lfs.attributes.access
(time) get float number. When debug (Lua 5.3) get integer number.Also, some field in attributes is not the same.access
will change, each time when access symbolic link of source folder.