mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 06:18:07 +03:00
overlay: check if we're about to save an empty path
Summary: On Windows, we've had a couple of cases where the overlay is corrupted which prevent remounting EdenFS. In this case, one entry of a directory was an empty path. Let's try to catch the error when it happens, instead of after the fact. Reviewed By: wez Differential Revision: D21443002 fbshipit-source-id: 47e59aee803cc0b4befd6e0585836d5c68e905b1
This commit is contained in:
parent
13a8f17325
commit
97814429bc
@ -249,6 +249,9 @@ void Overlay::saveOverlayDir(InodeNumber inodeNumber, const DirContents& dir) {
|
||||
const auto& entName = entIter.first;
|
||||
const auto& ent = entIter.second;
|
||||
|
||||
CHECK_NE(entName, "")
|
||||
<< "saveOverlayDir called with entry with an empty path for directory with inodeNumber="
|
||||
<< inodeNumber;
|
||||
CHECK_LT(ent.getInodeNumber().get(), nextInodeNumber)
|
||||
<< "saveOverlayDir called with entry using unallocated inode number";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user