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