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:
ed 2023-09-22 23:05:07 +00:00
parent 163e3fce46
commit a62f744a18

View file

@ -952,6 +952,11 @@ class Up2k(object):
rtop = absreal(top)
n_add = n_rm = 0
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(
db,
top,