* Determine the full filename of a piece of content information * @param ci the information to get the filename from * @param compressed should the filename end with .gz? * @return a statically allocated buffer with the filename or * nullptr when no filename could be made. */
| 369 | * nullptr when no filename could be made. |
| 370 | */ |
| 371 | static std::string GetFullFilename(const ContentInfo &ci, bool compressed) |
| 372 | { |
| 373 | Subdirectory dir = GetContentInfoSubDir(ci.type); |
| 374 | if (dir == NO_DIRECTORY) return {}; |
| 375 | |
| 376 | std::string buf = FioGetDirectory(SP_AUTODOWNLOAD_DIR, dir); |
| 377 | buf += ci.filename; |
| 378 | buf += compressed ? ".tar.gz" : ".tar"; |
| 379 | |
| 380 | return buf; |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * Gunzip a given file and remove the .gz if successful. |
no test coverage detected