diff --git a/photos.py b/photos.py index a3aa813..4242d6e 100644 --- a/photos.py +++ b/photos.py @@ -94,8 +94,13 @@ def photos(): p = p.replace('/', '\\') if( os.path.exists( p ) ): view_path = p - print(os.path.basename(p)) - #os.symlink('\\static\\BOLLOCKS', p) + if os.path.exists( p ): + if p.startswith('c:'): + symlink = 'static\\{}'.format( os.path.basename(p[0:-1])) + else: + symlink = 'static/{}'.format( os.path.basename(p[0:-1])) + if not os.path.exists(symlink): + os.symlink(p, symlink) file_list.append(glob.glob(view_path + '**', recursive=True)) for file in file_list[0]: fthumbnail = None