mirror of
https://github.com/9001/copyparty.git
synced 2025-11-06 14:53:17 +00: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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user