return {"", false};
}
std::error_code ec;
- fs::path target_path = fs::weakly_canonical(fs::path{dev_target}, ec);
+ fs::path target = fs::weakly_canonical(fs::path{dev_target}, ec);
if (ec) {
cerr << "failed to retrieve absolute path for " << dev_target
<< ": " << ec.message()
<< std::endl;
exit(EXIT_FAILURE);
}
- return {target_path.native(),
- (fs::exists(target_path) &&
- fs::is_regular_file(target_path) &&
- fs::file_size(target_path) > 0)};
+ return {target.native(),
+ fs::exists(target) &&
+ (fs::is_block_file(target) ||
+ (fs::is_regular_file(target) && fs::file_size(target) > 0))};
}();
// Attach either DB or WAL volume, create if needed
// check if we need additional size specification