mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 10:40:48 +00:00
Fix bug #11750.
Unfortunately, stat.st_ino returns 0 on Windows, at least on Python 2.7, so we can't use that way of telling when we're seeing the same directory again. Surely the real pathname should work.
(cherry picked from commit 9d8dfe934b
)
This commit is contained in:
parent
fb6b8201c4
commit
cae946ddd7
@ -121,10 +121,11 @@ for type in types:
|
|||||||
# prevent inifinite recursion
|
# prevent inifinite recursion
|
||||||
recurse = []
|
recurse = []
|
||||||
for dir in dirs:
|
for dir in dirs:
|
||||||
st = os.stat(os.path.join(root, dir))
|
dirname = os.path.join(root, dir)
|
||||||
key = st.st_dev, st.st_ino
|
dirname = os.path.realpath(dirname)
|
||||||
if key not in visited:
|
dirname = os.path.normcase(dirname)
|
||||||
visited.add(key)
|
if dirname not in visited:
|
||||||
|
visited.add(dirname)
|
||||||
recurse.append(dir)
|
recurse.append(dir)
|
||||||
dirs[:] = recurse
|
dirs[:] = recurse
|
||||||
# check file type
|
# check file type
|
||||||
|
Loading…
Reference in New Issue
Block a user