mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
support ~ paths
This commit is contained in:
parent
a2657887cc
commit
1034a51bd2
1
.vscode/launch.py
vendored
1
.vscode/launch.py
vendored
|
@ -16,6 +16,7 @@ with open(".vscode/launch.json", "r") as f:
|
||||||
|
|
||||||
oj = jstyleson.loads(tj)
|
oj = jstyleson.loads(tj)
|
||||||
argv = oj["configurations"][0]["args"]
|
argv = oj["configurations"][0]["args"]
|
||||||
|
argv = [os.path.expanduser(x) if x.startswith("~") else x for x in argv]
|
||||||
try:
|
try:
|
||||||
copyparty(argv)
|
copyparty(argv)
|
||||||
except SystemExit as ex:
|
except SystemExit as ex:
|
||||||
|
|
|
@ -233,12 +233,6 @@ class AuthSrv(object):
|
||||||
def log(self, msg, c=0):
|
def log(self, msg, c=0):
|
||||||
self.log_func("auth", msg, c)
|
self.log_func("auth", msg, c)
|
||||||
|
|
||||||
def invert(self, orig):
|
|
||||||
if PY2:
|
|
||||||
return {v: k for k, v in orig.iteritems()}
|
|
||||||
else:
|
|
||||||
return {v: k for k, v in orig.items()}
|
|
||||||
|
|
||||||
def laggy_iter(self, iterable):
|
def laggy_iter(self, iterable):
|
||||||
"""returns [value,isFinalValue]"""
|
"""returns [value,isFinalValue]"""
|
||||||
it = iter(iterable)
|
it = iter(iterable)
|
||||||
|
@ -495,7 +489,7 @@ class AuthSrv(object):
|
||||||
with self.mutex:
|
with self.mutex:
|
||||||
self.vfs = vfs
|
self.vfs = vfs
|
||||||
self.user = user
|
self.user = user
|
||||||
self.iuser = self.invert(user)
|
self.iuser = {v: k for k, v in user.items()}
|
||||||
|
|
||||||
# import pprint
|
# import pprint
|
||||||
# pprint.pprint({"usr": user, "rd": mread, "wr": mwrite, "mnt": mount})
|
# pprint.pprint({"usr": user, "rd": mread, "wr": mwrite, "mnt": mount})
|
||||||
|
|
Loading…
Reference in a new issue