##// END OF EJS Templates
osutil: fix the bug on OS X when we return more in listdir...
Maciej Fijalkowski -
r29821:8656dcac default
parent child Browse files
Show More
@@ -120,13 +120,14 b" if sys.platform == 'darwin' and ffi is n"
120 if skip == name and tp == statmod.S_ISDIR:
120 if skip == name and tp == statmod.S_ISDIR:
121 return []
121 return []
122 if stat:
122 if stat:
123 mtime = cur.time.tv_sec
123 mtime = cur.mtime.tv_sec
124 mode = (cur.accessmask & ~lib.S_IFMT)| tp
124 mode = (cur.accessmask & ~lib.S_IFMT)| tp
125 ret.append((name, tp, stat_res(st_mode=mode, st_mtime=mtime,
125 ret.append((name, tp, stat_res(st_mode=mode, st_mtime=mtime,
126 st_size=cur.datalength)))
126 st_size=cur.datalength)))
127 else:
127 else:
128 ret.append((name, tp))
128 ret.append((name, tp))
129 cur += lgt
129 cur = ffi.cast("val_attrs_t*", int(ffi.cast("intptr_t", cur))
130 + lgt)
130 return ret
131 return ret
131
132
132 def listdir(path, stat=False, skip=None):
133 def listdir(path, stat=False, skip=None):
General Comments 0
You need to be logged in to leave comments. Login now