From c0f8ea3f976f4df58b185d2636b5899c8d48d180 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 29 Apr 2011 19:55:47 +0000 Subject: When performing an SQL export only append the file extension if necessary. Fixes issue #1035. --- Source/SPExportInitializer.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index f1868210..32ce7ff5 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -282,8 +282,11 @@ // Create custom filename if required [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [self generateDefaultExportFilename]]; - [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]]; - + // Only append the extension if necessary + if (![[exportFilename pathExtension] length]) { + [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]]; + } + file = [SPExportFile exportFileAtPath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]]; [exportFiles addObject:file]; -- cgit v1.2.3