Modificate segnalazioni di errore nell'apertura files

temporanei


git-svn-id: svn://10.65.10.50/trunk@4577 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-06-10 14:38:12 +00:00
parent 67b62e323e
commit 036a257e6e

View File

@ -1465,9 +1465,9 @@ TIsamtempfile::TIsamtempfile(int logicnum, const char* radix, bool create)
FILE* f = fopen(n, "r");
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
CHECKS(f, "Can't open temporary file ", (const char*)_strerror(NULL));
#else
CHECKS(f, "Can't open temporary file ", (const char*)n);
TString err;
err.format("Can't open temporary file %s: %s",(const char*) n,(const char*)_strerror(NULL));
CHECK(f, (const char *) err );
#endif
fseek(f, 0, SEEK_END);
@ -1539,8 +1539,18 @@ int TIsamtempfile::open(
err = get_error(filehnd()->fhnd);
if (err != NOERR)
{
TFilename n(filehnd()->d->SysName);
relisfd(_isamfile);
fatal_box("Open temporary file: Error n. %d ",err);
if (err == -60)
{
if (access(n,0)) // check for existance
fatal_box("Apertura file %s : errore n. %d. File non esistente.",(const char*) n,err);
else
fatal_box("Apertura file %s : errore n. %d. File aperto in uso esclusivo da un'altra applicazione.",(const char*) n,err);
}
else
fatal_box("Apertura file %s : errore n. %d ",(const char*) n,err);
}
else
{