| 85 | } |
| 86 | |
| 87 | static bool compare_files(const char* sfile, const char* dfile, bool ignore) |
| 88 | { |
| 89 | acl::string sbuf, dbuf; |
| 90 | |
| 91 | if (acl::ifstream::load(sfile, &sbuf) == false) { |
| 92 | logger_error("load sfile %s error %s", sfile, acl::last_serror()); |
| 93 | return false; |
| 94 | } |
| 95 | |
| 96 | if (acl::ifstream::load(dfile, &dbuf) == false) { |
| 97 | if (acl::last_error() == ENOENT && ignore) |
| 98 | return true; |
| 99 | logger_error("load dfile %s error %s", dfile, acl::last_serror()); |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | return sbuf == dbuf; |
| 104 | } |
| 105 | |
| 106 | static void diff_path(acl::scan_dir& scan, const char* spath, const char* dpath, |
| 107 | bool recursive, const char* file_types, bool show_all, bool ignore) |
no test coverage detected
searching dependent graphs…