InstallTrigger.compareVersion() returns correct answer for directories (bug 136779) r=curt,sr=alecf

This commit is contained in:
dveditz%netscape.com 2002-06-26 00:41:06 +00:00
Родитель d36c3d7b48
Коммит 4f84ad121f
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -1011,8 +1011,15 @@ VR_INTERFACE(REGERR) VR_ValidateComponent(char *component_path)
}
{
uint32 len;
struct stat statStruct;
// directories are stored with a trailing separator -- if we
// have one of these we have to remove it for stat to work
len = strlen(path);
if ( path[len-1] == VR_FILE_SEP )
path[len-1] = 0;
if ( stat ( path, &statStruct ) != 0 ) {
err = REGERR_NOFILE;
}