diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-05 14:46:42 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-05 14:46:42 (GMT) |
| commit | b35fd0298c0029c17b2377550217e2cd58b4b229 (patch) | |
| tree | 3313398822670ea8705178919c4b9174463d7ccb /src/client/Client.cpp | |
| parent | 7313bd81ca0fb497062ce350caa89e7e813f54f0 (diff) | |
| download | powder-b35fd0298c0029c17b2377550217e2cd58b4b229.zip powder-b35fd0298c0029c17b2377550217e2cd58b4b229.tar.gz | |
Flush stamps list to file when deletins, Rename stamps undelete function to rescan
Diffstat (limited to 'src/client/Client.cpp')
| -rw-r--r-- | src/client/Client.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 511e659..b35c292 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -850,6 +850,8 @@ void Client::DeleteStamp(std::string stampID) return; } } + + updateStamps(); } std::string Client::AddStamp(GameSave * saveData) @@ -911,7 +913,7 @@ void Client::updateStamps() return; } -void Client::UnDeleteStamps() +void Client::RescanStamps() { DIR * directory; struct dirent * entry; @@ -921,7 +923,7 @@ void Client::UnDeleteStamps() stampIDs.clear(); while (entry = readdir(directory)) { - if(strncmp(entry->d_name, "..", 3) && strncmp(entry->d_name, ".", 2) && strstr(entry->d_name, ".stm")) + if(strncmp(entry->d_name, "..", 3) && strncmp(entry->d_name, ".", 2) && strstr(entry->d_name, ".stm") && strlen(entry->d_name) == 14) { char stampname[11]; strncpy(stampname, entry->d_name, 10); |
