--- fromcwd.cc-0 Thu Jan 24 16:43:58 2002 +++ fromcwd.cc Thu Jan 24 16:40:07 2002 @@ -179,8 +179,9 @@ do_fromcwd (HINSTANCE h, HWND owner) /* Is there a -src file too? */ int n = find_tar_ext (p->info[t].install); strcpy (srcpath, p->info[t].install); - strcpy (srcpath + n, "-src.tar.gz"); - msg ("looking for %s", srcpath); + strcpy (srcpath + n, "-src"); + /* First try same extension as the binary */ + strcat (srcpath, p->info[t].install + n); WIN32_FIND_DATA wfd; HANDLE h = FindFirstFile (srcpath, &wfd); @@ -189,12 +190,21 @@ do_fromcwd (HINSTANCE h, HWND owner) strcpy (srcpath + n, "-src.tar.bz2"); h = FindFirstFile (srcpath, &wfd); } + if (h == INVALID_HANDLE_VALUE) + { + strcpy (srcpath + n, "-src.tar.gz"); + h = FindFirstFile (srcpath, &wfd); + } if (h != INVALID_HANDLE_VALUE) { - msg ("-- got it"); + msg ("found source file %s", srcpath); FindClose (h); p->info[t].source = _strdup (srcpath); p->info[t].source_size = wfd.nFileSizeLow; + } + else + { + msg ("did not find source file for %s", p->info[t].install); } } }