diff options
Diffstat (limited to 'src/client/Client.cpp')
| -rw-r--r-- | src/client/Client.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 238c216..a1becf4 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -8,6 +8,7 @@ #include <stdio.h> #include <deque> #include <fstream> +#include <dirent.h> #ifdef MACOSX #include <mach-o/dyld.h> @@ -910,6 +911,28 @@ void Client::updateStamps() return; } +void Client::UnDeleteStamps() +{ + DIR * directory; + struct dirent * entry; + directory = opendir("stamps"); + if (directory != NULL) + { + stampIDs.clear(); + while (entry = readdir(directory)) + { + if(strncmp(entry->d_name, "..", 3) && strncmp(entry->d_name, ".", 2) && strcmp(entry->d_name, ".stm")) + { + char stampname[11]; + strncpy(stampname, entry->d_name, 10); + stampIDs.push_front(stampname); + } + } + closedir(directory); + updateStamps(); + } +} + int Client::GetStampsCount() { return stampIDs.size(); |
