mirror of
https://github.com/9001/copyparty.git
synced 2026-03-24 00:53:23 +10:00
throw ValueError for clarity
This commit is contained in:
@@ -709,7 +709,7 @@ class VFS(object):
|
|||||||
if self.shr_files:
|
if self.shr_files:
|
||||||
assert self.shr_src # !rm
|
assert self.shr_src # !rm
|
||||||
if rem and rem not in self.shr_files:
|
if rem and rem not in self.shr_files:
|
||||||
return "\n\n"
|
return "\n\n\0\n\n"
|
||||||
if resolve:
|
if resolve:
|
||||||
rap = absreal(ap)
|
rap = absreal(ap)
|
||||||
vn, rem = self.shr_src
|
vn, rem = self.shr_src
|
||||||
@@ -718,7 +718,7 @@ class VFS(object):
|
|||||||
# not the dir itself; assert file allowed
|
# not the dir itself; assert file allowed
|
||||||
ad, fn = os.path.split(rap)
|
ad, fn = os.path.split(rap)
|
||||||
if chk != ad or fn not in self.shr_files:
|
if chk != ad or fn not in self.shr_files:
|
||||||
return "\n\n"
|
return "\n\n\0\n\n"
|
||||||
|
|
||||||
return (rap or absreal(ap)) if resolve else ap
|
return (rap or absreal(ap)) if resolve else ap
|
||||||
|
|
||||||
@@ -737,7 +737,7 @@ class VFS(object):
|
|||||||
if chk != absreal(ap):
|
if chk != absreal(ap):
|
||||||
# not the dir itself; assert file allowed
|
# not the dir itself; assert file allowed
|
||||||
if ad != chk or fn not in self.shr_files:
|
if ad != chk or fn not in self.shr_files:
|
||||||
return "\n\n"
|
return "\n\n\0\n\n"
|
||||||
|
|
||||||
return os.path.join(ad, fn)
|
return os.path.join(ad, fn)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user