From 4e41ec610fa32eca71276fae92b5fea7606e4889 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Mon, 17 Jan 2000 04:13:05 +0000 Subject: [PATCH] bug fix for bug #11199, should remove partially created output file. git-svn-id: svn://10.0.0.236/trunk@57992 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/typelib/xpidl/macplugin/mac_xpidl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/xpcom/typelib/xpidl/macplugin/mac_xpidl.cpp b/mozilla/xpcom/typelib/xpidl/macplugin/mac_xpidl.cpp index cc3a09100ad..dfb5b237b21 100644 --- a/mozilla/xpcom/typelib/xpidl/macplugin/mac_xpidl.cpp +++ b/mozilla/xpcom/typelib/xpidl/macplugin/mac_xpidl.cpp @@ -226,6 +226,11 @@ static CWResult Compile(CWPluginContext context) objectData.objectfile = &gOutputFile; err = CWStoreObjectData(context, fileNum, &objectData); + } else { + // an error occured, delete the output file, which might be a partial file. + if (gOutputFile.name[0] != 0) { + ::FSpDelete(&gOutputFile); + } } delete[] gSourcePath;