do not display hidden files
This commit is contained in:
@@ -11,7 +11,7 @@ import hashlib
|
||||
import zipfile
|
||||
from revprox import ReverseProxied
|
||||
|
||||
__FLEES_VERSION__ = "20180218.0"
|
||||
__FLEES_VERSION__ = "20180218.1"
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(__name__)
|
||||
# Read config from json !
|
||||
@@ -120,6 +120,8 @@ def list_view(name, password = None):
|
||||
fp = os.path.join(share['path'],file)
|
||||
if os.path.isdir(fp):
|
||||
continue
|
||||
if file.startswith("."):
|
||||
continue
|
||||
status = file_stat(fp)
|
||||
status.update({
|
||||
'token': get_direct_token(share, file)
|
||||
|
||||
@@ -310,6 +310,10 @@ def print_rest_api(shares, config, opts):
|
||||
print("no files")
|
||||
sys.exit(0)
|
||||
for filename in sorted(os.listdir(share_path)):
|
||||
if os.path.isdir(os.path.join(share_path,filename)):
|
||||
continue
|
||||
if filename.startswith("."):
|
||||
continue
|
||||
print("%s/download/%s/%s/%s"%(
|
||||
config['public_url'],
|
||||
share['name'],
|
||||
@@ -330,6 +334,10 @@ def print_rest_api(shares, config, opts):
|
||||
print("no files")
|
||||
sys.exit(0)
|
||||
for filename in sorted(os.listdir(share_path)):
|
||||
if os.path.isdir(os.path.join(share_path,filename)):
|
||||
continue
|
||||
if filename.startswith("."):
|
||||
continue
|
||||
print("%s/direct/%s/%s/%s"%(
|
||||
config['public_url'],
|
||||
share['name'],
|
||||
|
||||
Reference in New Issue
Block a user