aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPExportFileUtilities.m13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m
index aafea54d..778deb3e 100644
--- a/Source/SPExportFileUtilities.m
+++ b/Source/SPExportFileUtilities.m
@@ -31,10 +31,11 @@
#import "SPExportFileUtilities.h"
#import "SPExportInitializer.h"
#import "SPExporter.h"
-#import "SPAlertSheets.h"
#import "SPExportFile.h"
#import "SPDatabaseDocument.h"
#import "SPCustomQuery.h"
+#import "SPTableContent.h"
+#import "SPTableContentDelegate.h"
#import <SPMySQL/SPMySQL.h>
@@ -53,7 +54,7 @@ SPExportErrorChoice;
@end
-@implementation SPExportController (SPExportFileUtilities)
+@implementation SPExportController (SPExportFileUtilitiesPrivateAPI)
/**
* Writes the CSV file header to the supplied export file.
@@ -115,7 +116,7 @@ SPExportErrorChoice;
if ([exportXMLFormatPopUpButton indexOfSelectedItem] == SPXMLExportMySQLFormat) {
- NSString *tag = @"";
+ NSString *tag;
if (exportSource == SPTableExport) {
tag = [NSString stringWithFormat:@"<mysqldump xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n<database name=\"%@\">\n\n", [tableDocumentInstance database]];
@@ -141,6 +142,11 @@ SPExportErrorChoice;
*/
- (void)errorCreatingExportFileHandles:(NSArray *)files
{
+ // We don't know where "files" came from, but we know 2 things:
+ // - NSAlert will NOT retain it as contextInfo
+ // - This method continues execution after [alert beginSheet:...], thus even if files was retained before, it could be released before the alert ends
+ [files retain];
+
// Get the number of files that already exist as well as couldn't be created because of other reasons
NSUInteger filesAlreadyExisting = 0;
NSUInteger parentFoldersMissing = 0;
@@ -270,6 +276,7 @@ SPExportErrorChoice;
[exportProgressWindow orderOut:self];
[alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:files];
+ [alert autorelease];
}
/**