Cleanup Code. (Thx to Ged Murphy)

Update Info.txt

svn path=/trunk/tools/RosBE-Windows/; revision=474
This commit is contained in:
Daniel Reimer 2007-10-30 14:34:27 +00:00
parent ecf182a9d7
commit e4d51ba47f
2 changed files with 10 additions and 16 deletions

View File

@ -68,23 +68,18 @@ WriteSettings(HWND hwnd)
if (writelog)
{
GetCurrentDirectory(MAX_PATH, checklog);
if (SetCurrentDirectory(logdir))
if (logdir[0] != 0)
{
SetCurrentDirectory(checklog);
}
else
{
wcscpy(checklog, logdir);
if (wcslen(checklog) < 1)
DWORD ret = GetCurrentDirectoryW(MAX_PATH, checklog);
if (ret != 0 && ret < MAX_PATH)
{
SetCurrentDirectory(checklog);
}
else if (!CreateDirectory(logdir, NULL))
{
LoadString(hInstance, MSG_DIREFAILED, msgerror, 256);
MessageBox(NULL, msgerror, NULL, MB_ICONERROR);
return FALSE;
if (!SetCurrentDirectoryW(logdir))
{
SetCurrentDirectoryW(checklog);
if (LoadStringW(hInstance, MSG_DIREFAILED, msgerror, 256))
MessageBoxW(NULL, msgerror, NULL, MB_ICONERROR);
return FALSE;
}
}
}
}

View File

@ -3,7 +3,6 @@ cut: http://www.ltr-data.se/files/cut.zip
sed: http://gnuwin32.sourceforge.net/packages/sed.htm
grep: http://gnuwin32.sourceforge.net/packages/grep.htm
svn: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
svnversion: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
Additional Libs needed:
LibIntl: http://gnuwin32.sourceforge.net/packages/libintl.htm