mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
support fat32 time precision, avoiding rescans
posted from warzaw airport otw to japan
This commit is contained in:
parent
b4c7282956
commit
8a7135cf41
|
@ -848,6 +848,7 @@ class Up2k(object):
|
||||||
seen = seen + [rcdir]
|
seen = seen + [rcdir]
|
||||||
unreg: list[str] = []
|
unreg: list[str] = []
|
||||||
files: list[tuple[int, int, str]] = []
|
files: list[tuple[int, int, str]] = []
|
||||||
|
fat32 = True
|
||||||
|
|
||||||
assert self.pp and self.mem_cur
|
assert self.pp and self.mem_cur
|
||||||
self.pp.msg = "a{} {}".format(self.pp.n, cdir)
|
self.pp.msg = "a{} {}".format(self.pp.n, cdir)
|
||||||
|
@ -872,6 +873,9 @@ 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:
|
||||||
|
fat32 = False
|
||||||
|
|
||||||
if stat.S_ISDIR(inf.st_mode):
|
if stat.S_ISDIR(inf.st_mode):
|
||||||
rap = absreal(abspath)
|
rap = absreal(abspath)
|
||||||
if dev and inf.st_dev != dev:
|
if dev and inf.st_dev != dev:
|
||||||
|
@ -959,6 +963,9 @@ class Up2k(object):
|
||||||
self.log(t.format(top, rp, len(in_db), rep_db))
|
self.log(t.format(top, rp, len(in_db), rep_db))
|
||||||
dts = -1
|
dts = -1
|
||||||
|
|
||||||
|
if fat32 and abs(dts - lmod) == 1:
|
||||||
|
dts = lmod
|
||||||
|
|
||||||
if dts == lmod and dsz == sz and (nohash or dw[0] != "#" or not sz):
|
if dts == lmod and dsz == sz and (nohash or dw[0] != "#" or not sz):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue