OpenVMS specific fix for defeciency in stat.

b=60199 r=dougt a=waterson


git-svn-id: svn://10.0.0.236/trunk@82898 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
colin%theblakes.com
2000-11-27 11:19:41 +00:00
parent 4967bacdba
commit 031f48020c

View File

@@ -43,6 +43,9 @@
#include <Path.h>
#include <Entry.h>
#endif
#if defined(VMS)
#include <fabdef.h>
#endif
#include "nsCRT.h"
#include "nsCOMPtr.h"
@@ -921,6 +924,14 @@ nsLocalFile::GetFileSize(PRInt64 *aFileSize)
NS_ENSURE_ARG_POINTER(aFileSize);
VALIDATE_STAT_CACHE();
#if defined(VMS)
/* Only two record formats can report correct file content size */
if ((mCachedStat.st_fab_rfm != FAB$C_STMLF) &&
(mCachedStat.st_fab_rfm != FAB$C_STMCR)) {
return NS_ERROR_FAILURE;
}
#endif
/* XXX autoconf for and use stat64 if available */
if (S_ISDIR(mCachedStat.st_mode)) {
*aFileSize = LL_ZERO;