Skip to content

Commit e248f1f

Browse files
committed
- fix: Syntax error
- chore: Show processing save / bcat files
1 parent 492555a commit e248f1f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

client/source/fileio.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ int walk(const std::string& path, std::function<void(const std::string&, bool is
3030

3131
const std::string fullPath = path[path.size() - 1] == '/' ? path + entry->d_name : path + "/" + entry->d_name;
3232

33-
if (entry->d_type == DT_DIR)
33+
if (entry->d_type == DT_DIR)
3434
{
3535
walk(fullPath, callback);
36+
callback(fullPath, true);
3637
}
37-
callback(fullPath, true);
38-
else
38+
else
3939
{
4040
callback(fullPath, false);
4141
}

client/source/savedata.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,10 @@ int restoreSaveData(AccountUid uid, const u64 titleID, const std::string& source
155155
{
156156
if (isDir)
157157
{
158-
drawText("remove dir: " + path);
159158
rmdir(path.c_str());
160159
}
161160
else
162161
{
163-
drawText("remove file: " + path);
164162
remove(path.c_str());
165163
}
166164
});
@@ -177,7 +175,6 @@ int restoreSaveData(AccountUid uid, const u64 titleID, const std::string& source
177175
}
178176
else
179177
{
180-
drawText("remove file: " + path);
181178
remove(path.c_str());
182179
}
183180
});
@@ -187,7 +184,6 @@ int restoreSaveData(AccountUid uid, const u64 titleID, const std::string& source
187184
bool success = true;
188185
zipReader.walk([&](const std::string& path, ZipReader::EXTRACT_ONE_FUNC extractOneFunc)
189186
{
190-
drawText(path);
191187
if (!success)
192188
{
193189
return false;
@@ -196,6 +192,9 @@ int restoreSaveData(AccountUid uid, const u64 titleID, const std::string& source
196192
if (startWith(path, "saves/"))
197193
{
198194
const std::string savePath = "save:/" + path.substr(strlen("saves/"));
195+
196+
drawText("* " + path + " -> " + savePath);
197+
199198
success = extractOneFunc(savePath);
200199

201200
if (!success)
@@ -212,6 +211,7 @@ int restoreSaveData(AccountUid uid, const u64 titleID, const std::string& source
212211
else if (startWith(path, "bcat/"))
213212
{
214213
const std::string bcatPath = "bcat:/" + path.substr(strlen("bcat/"));
214+
drawText("* " + path + " -> " + bcatPath);
215215
success = extractOneFunc(bcatPath);
216216
if (success)
217217
{

0 commit comments

Comments
 (0)