summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2001-11-06 10:24:52 +0000
committerHans-Joachim Lankenau <hjs@openoffice.org>2001-11-06 10:24:52 +0000
commit02100d0a9e19621ee7fe3c38ebbfcf373b29af45 (patch)
treea5bce2a274f57d62317663398aeb70bc213afbc2 /rsc
parent638a46df242542ad11ae93063203fe815b47f12f (diff)
#94297# more verbose error message, rename instead of link
Diffstat (limited to 'rsc')
-rw-r--r--rsc/inc/rscerror.h5
-rw-r--r--rsc/source/parser/erscerr.cxx10
-rw-r--r--rsc/source/rsc/rsc.cxx12
3 files changed, 19 insertions, 8 deletions
diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h
index 622d753e88c3..d803a5e63297 100644
--- a/rsc/inc/rscerror.h
+++ b/rsc/inc/rscerror.h
@@ -2,9 +2,9 @@
*
* $RCSfile: rscerror.h,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: pl $ $Date: 2001-10-10 11:51:13 $
+ * last change: $Author: hjs $ $Date: 2001-11-06 11:23:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,6 +80,7 @@
#define ERR_REFTODEEP 0x0108 // Return
#define ERR_FILEFORMAT 0x0109 // Return
#define ERR_FILESIZE 0x010A // Return
+#define ERR_RENAMEFILE 0x010B // Return
#define ERR_RSCRANGE 0x0200 // Return
#define ERR_RSCRANGE_OUTDEFSET (ERR_RSCRANGE +1 )
diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx
index 8eb5e13f0023..920ff230fee5 100644
--- a/rsc/source/parser/erscerr.cxx
+++ b/rsc/source/parser/erscerr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: erscerr.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: pl $ $Date: 2001-10-10 11:51:23 $
+ * last change: $Author: hjs $ $Date: 2001-11-06 11:24:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -181,6 +181,12 @@ void RscError::WriteError( const ERRTYPE& rError, const char * pMessage )
StdLstOut( "> cannot be opened." );
break;
+ case ERR_RENAMEFILE:
+ StdLstOut( "rename <" );
+ StdLstOut( pMessage );
+ StdLstOut( "> s not possible." );
+ break;
+
case ERR_FILESIZE:
StdLstOut( "Wrong file <" );
StdLstOut( pMessage );
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index d8347601beff..906a3d312969 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: rsc.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: pl $ $Date: 2001-11-05 14:44:05 $
+ * last change: $Author: hjs $ $Date: 2001-11-06 11:24:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -875,8 +875,12 @@ ERRTYPE RscCompiler::Link()
#ifdef DEBUG
fprintf( stderr, "move %s -> %s\n", pTmp, it->aOutputRc.GetBuffer() );
#endif
- link( pTmp, it->aOutputRc.GetBuffer() );
- unlink( pTmp );
+ if( rename( pTmp, it->aOutputRc.GetBuffer() ) )
+ {
+ char aBuf[1024];
+ sprintf( aBuf, "%s -> %s", pTmp, it->aOutputRc.GetBuffer );
+ pTC->pEH->FatalError( ERR_RENAMEFILE, RscId(), aBuf );
+ }
free( pTmp );
}
};