{
BitmapResource icon = null;
char path[MAX_LOCATION];
- FileAttribs exists;
+ FileAttribs exists { };
GetSystemPathBuffer(path, editBox.contents);
- exists = FileExists(path);
+ if(!(path[0] == DIR_SEP && path[1] == DIR_SEP && (!path[2] || !strchr(&path[2], DIR_SEP))))
+ exists = FileExists(path);
switch(typeExpected)
{
}
}
+static define stackSize = 1024;
+
class SearchThread : Thread
{
public:
int frame, treeTop = 0;
int globalFindCount = 0, filesSearchedCount = 0, filesMatchedCount = 0, dirsMatchedCount = 0;
//double lastTime = GetTime();
- SearchStackFrame stack[1024];
+ SearchStackFrame stack[stackSize];
FindInFilesMode mode = this.mode;
EditBox replaceEdit = null;
strcpy(stack[0].path, dir);
stack[0].fileList = FileListing { dir, extensions = filter.extensions }; // there should be a sorted = true/false
- for(frame = 0; frame >= 0 && !abort; )
+ for(frame = 0; frame >= 0 && frame < stackSize && !abort; )
{
if(stack[frame].fileList.Find())
{