mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-12 13:59:46 -04:00
fix(scanner): don't perform potentially throwing operations in debug mode
This commit is contained in:
parent
bc7a3c1f31
commit
bbd8306a13
@ -369,7 +369,8 @@ scanner_<LoggerPolicy>::add_entry(std::filesystem::path const& name,
|
|||||||
if (pe) {
|
if (pe) {
|
||||||
switch (pe->type()) {
|
switch (pe->type()) {
|
||||||
case entry::E_FILE:
|
case entry::E_FILE:
|
||||||
if (pe->size() > 0 && os_.access(pe->fs_path(), R_OK)) {
|
if (!debug_filter && pe->size() > 0 &&
|
||||||
|
os_.access(pe->fs_path(), R_OK)) {
|
||||||
LOG_ERROR << "cannot access " << pe->path_as_string()
|
LOG_ERROR << "cannot access " << pe->path_as_string()
|
||||||
<< ", creating empty file";
|
<< ", creating empty file";
|
||||||
pe->override_size(0);
|
pe->override_size(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user