| 751 | } |
| 752 | |
| 753 | void File::buildStrippedFilename(const char* filename, char buff[], std::size_t limit) { |
| 754 | std::size_t sizeOfFilename = strlen(filename); |
| 755 | if (sizeOfFilename >= limit) { |
| 756 | filename += (sizeOfFilename - limit); |
| 757 | if (filename[0] != '.' && filename[1] != '.') { // prepend if not already |
| 758 | filename += 3; // 3 = '..' |
| 759 | STRCAT(buff, "..", limit); |
| 760 | } |
| 761 | } |
| 762 | STRCAT(buff, filename, limit); |
| 763 | } |
| 764 | |
| 765 | void File::buildBaseFilename(const std::string& fullPath, char buff[], std::size_t limit, const char* separator) { |
| 766 | const char *filename = fullPath.c_str(); |
nothing calls this directly
no outgoing calls
no test coverage detected