mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
prevent losing an out-of-volume index
if the server is started while an external drive is not mounted, it would drop the database because all the files are missing
This commit is contained in:
parent
163e3fce46
commit
a62f744a18
|
@ -952,6 +952,11 @@ class Up2k(object):
|
||||||
rtop = absreal(top)
|
rtop = absreal(top)
|
||||||
n_add = n_rm = 0
|
n_add = n_rm = 0
|
||||||
try:
|
try:
|
||||||
|
if not bos.listdir(rtop):
|
||||||
|
t = "volume /%s at [%s] is empty; will not be indexed as this could be due to an offline filesystem"
|
||||||
|
self.log(t % (vol.vpath, rtop), 6)
|
||||||
|
return True, False
|
||||||
|
|
||||||
n_add = self._build_dir(
|
n_add = self._build_dir(
|
||||||
db,
|
db,
|
||||||
top,
|
top,
|
||||||
|
|
Loading…
Reference in a new issue