version 1.353, 2005/02/11 09:58:49
|
version 1.354, 2005/02/15 12:06:11
|
Line 222 static int test_cachelock (char *filenam
|
Line 222 static int test_cachelock (char *filenam
|
{ |
{ |
#ifdef _WINDOWS |
#ifdef _WINDOWS |
/* if the lock is set, we can't unlink the file under Windows */ |
/* if the lock is set, we can't unlink the file under Windows */ |
if (!TtaFileUnlink (filename)) |
if (TtaFileUnlink(filename) == 0) |
return 0; |
return 0; |
else |
else |
return -1; |
return -1; |
Line 2182 int i;
|
Line 2182 int i;
|
HTCacheMode_setProtected (NO); |
HTCacheMode_setProtected (NO); |
|
|
/* get the cache dir (or use a default one) */ |
/* get the cache dir (or use a default one) */ |
|
#ifdef _WX |
|
strptr = TtaGetRealFileName(TtaGetEnvString ("CACHE_DIR")); |
|
#else /* _WX */ |
strptr = TtaGetEnvString ("CACHE_DIR"); |
strptr = TtaGetEnvString ("CACHE_DIR"); |
|
#endif /* _WX */ |
if (strptr && *strptr) |
if (strptr && *strptr) |
{ |
{ |
real_dir = (char *)TtaGetMemory (strlen (strptr) + strlen (CACHE_DIR_NAME) + 20); |
real_dir = (char *)TtaGetMemory (strlen (strptr) + strlen (CACHE_DIR_NAME) + 20); |
Line 2195 int i;
|
Line 2199 int i;
|
real_dir = (char *)TtaGetMemory (strlen (TempFileDirectory) + strlen (CACHE_DIR_NAME) + 20); |
real_dir = (char *)TtaGetMemory (strlen (TempFileDirectory) + strlen (CACHE_DIR_NAME) + 20); |
sprintf (real_dir, "%s%s", TempFileDirectory, CACHE_DIR_NAME); |
sprintf (real_dir, "%s%s", TempFileDirectory, CACHE_DIR_NAME); |
} |
} |
|
#ifdef _WX |
|
TtaFreeMemory(strptr); |
|
#endif /* _WX */ |
|
|
/* compatiblity with previous versions of Amaya: does real_dir |
/* compatiblity with previous versions of Amaya: does real_dir |
include CACHE_DIR_NAME? If not, add it */ |
include CACHE_DIR_NAME? If not, add it */ |
Line 3510 int PutObjectWWW (int docid, char *fileN
|
Line 3517 int PutObjectWWW (int docid, char *fileN
|
me->outputfile = (char *) NULL; |
me->outputfile = (char *) NULL; |
} |
} |
|
|
|
#ifdef _WX |
|
char * localfilename = TtaGetRealFileName (fileName); |
|
/* @@IV 18/08/2004 eencode spaces in the local filename */ |
|
fileURL = EscapeURL (localfilename); |
|
TtaFreeMemory(localfilename); |
|
#else /* _WX */ |
/* @@IV 18/08/2004 eencode spaces in the local filename */ |
/* @@IV 18/08/2004 eencode spaces in the local filename */ |
fileURL = EscapeURL (fileName); |
fileURL = EscapeURL (fileName); |
|
#endif /* _WX */ |
if (fileURL) |
if (fileURL) |
{ |
{ |
strcpy (file_name, fileURL); |
strcpy (file_name, fileURL); |