mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
v1.8.4
This commit is contained in:
parent
491803d8b7
commit
1441ccee4f
|
@ -1,8 +1,8 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
VERSION = (1, 8, 3)
|
VERSION = (1, 8, 4)
|
||||||
CODENAME = "argon"
|
CODENAME = "argon"
|
||||||
BUILD_DT = (2023, 7, 16)
|
BUILD_DT = (2023, 7, 18)
|
||||||
|
|
||||||
S_VERSION = ".".join(map(str, VERSION))
|
S_VERSION = ".".join(map(str, VERSION))
|
||||||
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
|
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
|
||||||
|
|
|
@ -109,6 +109,7 @@ flagcats = {
|
||||||
"nohash=\\.iso$": "skips hashing file contents if path matches *.iso",
|
"nohash=\\.iso$": "skips hashing file contents if path matches *.iso",
|
||||||
"noidx=\\.iso$": "fully ignores the contents at paths matching *.iso",
|
"noidx=\\.iso$": "fully ignores the contents at paths matching *.iso",
|
||||||
"noforget": "don't forget files when deleted from disk",
|
"noforget": "don't forget files when deleted from disk",
|
||||||
|
"fat32": "avoid excessive reindexing on android sdcardfs",
|
||||||
"dbd=[acid|swal|wal|yolo]": "database speed-durability tradeoff",
|
"dbd=[acid|swal|wal|yolo]": "database speed-durability tradeoff",
|
||||||
"xlink": "cross-volume dupe detection / linking",
|
"xlink": "cross-volume dupe detection / linking",
|
||||||
"xdev": "do not descend into other filesystems",
|
"xdev": "do not descend into other filesystems",
|
||||||
|
|
|
@ -3126,7 +3126,7 @@ class HttpCli(object):
|
||||||
return "" # unhandled / fallthrough
|
return "" # unhandled / fallthrough
|
||||||
|
|
||||||
def scanvol(self) -> bool:
|
def scanvol(self) -> bool:
|
||||||
if not self.can_read or not self.can_write:
|
if not self.can_admin:
|
||||||
raise Pebkac(403, "not allowed for user " + self.uname)
|
raise Pebkac(403, "not allowed for user " + self.uname)
|
||||||
|
|
||||||
if self.args.no_rescan:
|
if self.args.no_rescan:
|
||||||
|
@ -3149,7 +3149,7 @@ class HttpCli(object):
|
||||||
if act != "cfg":
|
if act != "cfg":
|
||||||
raise Pebkac(400, "only config files ('cfg') can be reloaded rn")
|
raise Pebkac(400, "only config files ('cfg') can be reloaded rn")
|
||||||
|
|
||||||
if not [x for x in self.wvol if x in self.rvol]:
|
if not self.avol:
|
||||||
raise Pebkac(403, "not allowed for user " + self.uname)
|
raise Pebkac(403, "not allowed for user " + self.uname)
|
||||||
|
|
||||||
if self.args.no_reload:
|
if self.args.no_reload:
|
||||||
|
@ -3159,7 +3159,7 @@ class HttpCli(object):
|
||||||
return self.redirect("", "?h", x.get(), "return to", False)
|
return self.redirect("", "?h", x.get(), "return to", False)
|
||||||
|
|
||||||
def tx_stack(self) -> bool:
|
def tx_stack(self) -> bool:
|
||||||
if not [x for x in self.wvol if x in self.rvol]:
|
if not self.avol and not [x for x in self.wvol if x in self.rvol]:
|
||||||
raise Pebkac(403, "not allowed for user " + self.uname)
|
raise Pebkac(403, "not allowed for user " + self.uname)
|
||||||
|
|
||||||
if self.args.no_stack:
|
if self.args.no_stack:
|
||||||
|
|
|
@ -883,6 +883,7 @@ class Up2k(object):
|
||||||
rei = vol.flags.get("noidx")
|
rei = vol.flags.get("noidx")
|
||||||
reh = vol.flags.get("nohash")
|
reh = vol.flags.get("nohash")
|
||||||
n4g = bool(vol.flags.get("noforget"))
|
n4g = bool(vol.flags.get("noforget"))
|
||||||
|
ffat = "fat32" in vol.flags
|
||||||
cst = bos.stat(top)
|
cst = bos.stat(top)
|
||||||
dev = cst.st_dev if vol.flags.get("xdev") else 0
|
dev = cst.st_dev if vol.flags.get("xdev") else 0
|
||||||
|
|
||||||
|
@ -919,6 +920,7 @@ class Up2k(object):
|
||||||
rei,
|
rei,
|
||||||
reh,
|
reh,
|
||||||
n4g,
|
n4g,
|
||||||
|
ffat,
|
||||||
[],
|
[],
|
||||||
cst,
|
cst,
|
||||||
dev,
|
dev,
|
||||||
|
@ -974,6 +976,7 @@ class Up2k(object):
|
||||||
rei: Optional[Pattern[str]],
|
rei: Optional[Pattern[str]],
|
||||||
reh: Optional[Pattern[str]],
|
reh: Optional[Pattern[str]],
|
||||||
n4g: bool,
|
n4g: bool,
|
||||||
|
ffat: bool,
|
||||||
seen: list[str],
|
seen: list[str],
|
||||||
cst: os.stat_result,
|
cst: os.stat_result,
|
||||||
dev: int,
|
dev: int,
|
||||||
|
@ -1018,7 +1021,7 @@ class Up2k(object):
|
||||||
|
|
||||||
lmod = int(inf.st_mtime)
|
lmod = int(inf.st_mtime)
|
||||||
sz = inf.st_size
|
sz = inf.st_size
|
||||||
if fat32 and inf.st_mtime % 2:
|
if fat32 and not ffat and inf.st_mtime % 2:
|
||||||
fat32 = False
|
fat32 = False
|
||||||
|
|
||||||
if stat.S_ISDIR(inf.st_mode):
|
if stat.S_ISDIR(inf.st_mode):
|
||||||
|
@ -1035,7 +1038,19 @@ class Up2k(object):
|
||||||
# self.log(" dir: {}".format(abspath))
|
# self.log(" dir: {}".format(abspath))
|
||||||
try:
|
try:
|
||||||
ret += self._build_dir(
|
ret += self._build_dir(
|
||||||
db, top, excl, abspath, rap, rei, reh, n4g, seen, inf, dev, xvol
|
db,
|
||||||
|
top,
|
||||||
|
excl,
|
||||||
|
abspath,
|
||||||
|
rap,
|
||||||
|
rei,
|
||||||
|
reh,
|
||||||
|
n4g,
|
||||||
|
fat32,
|
||||||
|
seen,
|
||||||
|
inf,
|
||||||
|
dev,
|
||||||
|
xvol,
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
t = "failed to index subdir [{}]:\n{}"
|
t = "failed to index subdir [{}]:\n{}"
|
||||||
|
|
Loading…
Reference in a new issue