mirror of
https://github.com/ksherlock/dot_clean.git
synced 2025-08-09 18:25:36 +00:00
fix bug
This commit is contained in:
@@ -100,7 +100,7 @@ void one_file(const std::string &data, const std::string &rsrc) noexcept try {
|
||||
defer close_fd([fd]{close(fd); });
|
||||
|
||||
|
||||
if (stat(data.c_str(), &rsrc_st) < 0) throw_errno();
|
||||
if (stat(rsrc.c_str(), &rsrc_st) < 0) throw_errno();
|
||||
if (rsrc_st.st_size == 0) {
|
||||
// mmapping a zero-length file throws EINVAL.
|
||||
if (!_p) unlink_list.push_back(rsrc);
|
||||
|
Reference in New Issue
Block a user