mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
mkdir missing volumes on startup
This commit is contained in:
parent
31101427d3
commit
e965b9b9e2
|
@ -442,6 +442,7 @@ class Up2k(object):
|
||||||
# only need to protect register_vpath but all in one go feels right
|
# only need to protect register_vpath but all in one go feels right
|
||||||
for vol in vols:
|
for vol in vols:
|
||||||
try:
|
try:
|
||||||
|
bos.makedirs(vol.realpath) # gonna happen at snap anyways
|
||||||
bos.listdir(vol.realpath)
|
bos.listdir(vol.realpath)
|
||||||
except:
|
except:
|
||||||
self.volstate[vol.vpath] = "OFFLINE (cannot access folder)"
|
self.volstate[vol.vpath] = "OFFLINE (cannot access folder)"
|
||||||
|
@ -1494,6 +1495,10 @@ class Up2k(object):
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
for ptop, flags in self.flags.items():
|
for ptop, flags in self.flags.items():
|
||||||
if "mtp" in flags:
|
if "mtp" in flags:
|
||||||
|
if ptop not in self.entags:
|
||||||
|
t = "skipping mtp for unavailable volume {}"
|
||||||
|
self.log(t.format(ptop), 1)
|
||||||
|
continue
|
||||||
self._run_one_mtp(ptop, gid)
|
self._run_one_mtp(ptop, gid)
|
||||||
|
|
||||||
td = time.time() - t0
|
td = time.time() - t0
|
||||||
|
@ -3307,7 +3312,7 @@ class Up2k(object):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# TODO is undef if vol 404 on startup
|
# TODO is undef if vol 404 on startup
|
||||||
entags = self.entags[ptop]
|
entags = self.entags.get(ptop)
|
||||||
if not entags:
|
if not entags:
|
||||||
self.log("no entags okay.jpg", c=3)
|
self.log("no entags okay.jpg", c=3)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue