Archived
Also filter out some other obviously invalid filenames (ref #1243)
This commit is contained in:
1 parent
25c26e2f81
commit
9a45f0b31c
2 files changed
+10
-6
No files matched your search
@@ -587,8 +587,9 @@ func ldbWithAllFolderTruncated(db *leveldb.DB, folder []byte, fn func(device []b
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if f.Name == "" {
|
||||
l.Infoln("Dropping invalid nil filename from database")
|
||||
switch f.Name {
|
||||
case "", ".", "..", "/": // A few obviously invalid filenames
|
||||
l.Infof("Dropping invalid filename %q from database", f.Name)
|
||||
batch := new(leveldb.Batch)
|
||||
ldbRemoveFromGlobal(db, batch, folder, device, nil)
|
||||
batch.Delete(dbi.Key())
|
||||
|
||||
Reference in new issue
Block a user