227 BuildFileList(); |
227 BuildFileList(); |
228 |
228 |
229 /* As long as we have files */ |
229 /* As long as we have files */ |
230 while (pos < _fios_num) { |
230 while (pos < _fios_num) { |
231 item = _fios_list + pos; |
231 item = _fios_list + pos; |
232 pos++; |
232 pos++; |
233 if (strcmp(argv[1], "..") == 0) { |
233 if (strcmp(argv[1], "..") == 0) { |
234 if (item->type == FIOS_TYPE_PARENT) { |
234 if (item->type == FIOS_TYPE_PARENT) { |
235 // huh we are searching for the parent directory |
235 // huh we are searching for the parent directory |
236 char buffer[10]; |
236 char buffer[10]; |
237 sprintf(buffer, "%d", pos); |
237 sprintf(buffer, "%d", pos); |
238 IConsoleVarSetString(result, buffer); |
238 IConsoleVarSetString(result, buffer); |
239 return result; |
239 return result; |
240 } |
240 } |
241 } else |
241 } else |
242 // file records ? |
242 // file records ? |
243 if (item->type == FIOS_TYPE_FILE) { |
243 if (item->type == FIOS_TYPE_FILE) { |
244 if (strcmp(argv[1], item->name) == 0) { |
244 if (strcmp(argv[1], item->name) == 0) { |
245 char buffer[10]; |
245 char buffer[10]; |
246 sprintf(buffer, "%d", pos); |
246 sprintf(buffer, "%d", pos); |
247 IConsoleVarSetString(result, buffer); |
247 IConsoleVarSetString(result, buffer); |
248 return result; |
248 return result; |
249 } |
249 } |
250 } |
250 } |
251 } |
251 } |
252 |
252 |
253 /* Destroy the file list */ |
253 /* Destroy the file list */ |
254 FiosFreeSavegameList(); |
254 FiosFreeSavegameList(); |