| 278 | snprintf(logName, sizeof(logName), "%s", (const char*)"FilesUsed"); |
| 279 | ::CreateDirectory(logName, nullptr); |
| 280 | strncat(logName, PATH_SEP_STR, sizeof(logName) - strlen(logName) - 1); |
| 281 | strncat(logName, bankName, sizeof(logName) - strlen(logName) - 1); |
| 282 | size_t len = strlen(logName); |
| 283 | if (len > 0 && (logName[len - 1] == '\\' || logName[len - 1] == '/')) |
| 284 | { |
| 285 | logName[len - 1] = 0; |
| 286 | } |
| 287 | strncat(logName, ".log", sizeof(logName) - strlen(logName) - 1); |
| 288 | |
| 289 | #ifndef _WIN32 |
| 290 | unixPath(logName); |
| 291 | #endif |
| 292 | FILE* file = fopen(logName, "r"); |
| 293 | if (file) |
| 294 | { |
| 295 | // read filenames already there |
| 296 | for (;;) |
| 297 | { |
| 298 | char buf[1024]; |
| 299 | *buf = 0; |
| 300 | fgets(buf, sizeof(buf), file); |
| 301 | if (!*buf) |
| 302 | { |
| 303 | break; |
| 304 | } |