| 154 | times.actime = static_cast<time_t>(timestamp); |
| 155 | times.modtime = static_cast<time_t>(timestamp); |
| 156 | return utime(path.c_str(), ×) == 0; |
| 157 | #endif |
| 158 | } |
| 159 | |
| 160 | } // namespace |
| 161 | |
| 162 | std::string PboCommand::StripPboExtension(const std::string& path) |
| 163 | { |
| 164 | // QFBank::open() appends ".pbo" automatically |
| 165 | if (path.size() >= 4) |
| 166 | { |
| 167 | std::string ext = path.substr(path.size() - 4); |
| 168 | for (auto& c : ext) |
| 169 | c = static_cast<char>(tolower(static_cast<unsigned char>(c))); |
| 170 | if (ext == ".pbo") |
| 171 | return path.substr(0, path.size() - 4); |
| 172 | } |