[viewvc-dev] ViewVC 1.1.11 - aspfool.cpp - Improvment

Yousha Aleayoub <[email protected]> Fri, 2 Sep 2011 13:46:46 +0100 (BST)
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <[email protected]>
Hi,
Some changes to improve aspfool.cpp:

ViewVC 1.1.11
File: windows/aspfool/aspfool.cpp
Line #8

[Original]
int inline file_exists(TCHAR const * filename)
{
  WIN32_FIND_DATA fd;
  HANDLE fh = FindFirstFile(filename, &fd);
  if (fh != INVALID_HANDLE_VALUE)
  {
    FindClose(fh);
    return fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? 2 : 1;
	 }

  return 0;
}

[Improved]
unsigned int inline file_exists(TCHAR const * filename)
{
	WIN32_FIND_DATA fd;
	HANDLE fh= FindFirstFile(filename, &fd);

	if(fh != INVALID_HANDLE_VALUE)
	{
		FindClose(fh);
		return (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? 2 : 1;
	}

	return 0;
}

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2834578

To unsubscribe from this discussion, e-mail: [[email protected]].