fix for missing symlinks
This commit is contained in:
@@ -85,11 +85,14 @@ def generate_index(opts):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def get_filelink(path,fname,images=False):
|
def get_filelink(path,fname,images=False):
|
||||||
fsize=os.path.getsize(os.path.join(path,fname))
|
if os.path.islink(os.path.join(path,fname)):
|
||||||
fsstr=sizeof(fsize)
|
(fsize,fsstr,fsstrb,fdstr)=(0,"NA","NA","NA")
|
||||||
fsstrb=str(fsize)
|
else:
|
||||||
fdate=time.localtime(os.path.getmtime(os.path.join(path,fname)))
|
fsize=os.path.getsize(os.path.join(path,fname))
|
||||||
fdstr=time.strftime("%Y/%m/%d %H:%M:%S",fdate)
|
fsstr=sizeof(fsize)
|
||||||
|
fsstrb=str(fsize)
|
||||||
|
fdate=time.localtime(os.path.getmtime(os.path.join(path,fname)))
|
||||||
|
fdstr=time.strftime("%Y/%m/%d %H:%M:%S",fdate)
|
||||||
if images and is_imagefile(fname):
|
if images and is_imagefile(fname):
|
||||||
fname_str=get_imagestr(fname)
|
fname_str=get_imagestr(fname)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user