Update of /cvsroot/bitcollider/bitcollider/lib
In directory usw-pr-cvs1:/tmp/cvs-serv19275/lib
Modified Files:
main.c
Log Message:
Finished the win32 port of the cache changes
Index: main.c
===================================================================
RCS file: /cvsroot/bitcollider/bitcollider/lib/main.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** main.c 2001/10/12 21:37:52 1.36
--- main.c 2001/10/12 23:07:42 1.37
***************
*** 20,28 ****
#include "plugin_man.h"
#include "tiger.h"
#ifndef _WIN32
#include "browser.h"
#include <errno.h>
#include <unistd.h>
- #include <sys/stat.h>
#else
#include <windows.h>
--- 20,28 ----
#include "plugin_man.h"
#include "tiger.h"
+ #include <sys/stat.h>
#ifndef _WIN32
#include "browser.h"
#include <errno.h>
#include <unistd.h>
#else
#include <windows.h>
***************
*** 304,314 ****
#if USE_BDB
/* Check to see if this bitprint has already been bitprinted */
if (realpath(fileName, centry.fileName) == NULL)
strcpy(centry.fileName, fileName);
if (submission->bc->cache &&
get_cache_entry(submission->bc->cache, ¢ry))
{
! if (stat(submission->fileName, &fileInfo) == 0)
{
if (fileInfo.st_mtime == centry.lastModDate)
--- 304,322 ----
#if USE_BDB
/* Check to see if this bitprint has already been bitprinted */
+ #ifdef WIN32
+ {
+ char *dummy;
+ if (GetFullPathName(fileName, MAX_PATH, centry.fileName, &dummy) == 0)
+ strcpy(centry.fileName, fileName);
+ }
+ #else
if (realpath(fileName, centry.fileName) == NULL)
strcpy(centry.fileName, fileName);
+ #endif
if (submission->bc->cache &&
get_cache_entry(submission->bc->cache, ¢ry))
{
! if (_stat(submission->fileName, (struct _stat *)&fileInfo) == 0)
{
if (fileInfo.st_mtime == centry.lastModDate)
***************
*** 452,456 ****
#if USE_BDB
! if (stat(submission->fileName, &fileInfo) == 0)
{
centry.lastModDate = fileInfo.st_mtime;
--- 460,464 ----
#if USE_BDB
! if (_stat(submission->fileName, (struct _stat *)&fileInfo) == 0)
{
centry.lastModDate = fileInfo.st_mtime;
|