diff --git a/Screenshot Framer/Document Window/Content View Controller/Help Controller/ExportController.swift b/Screenshot Framer/Document Window/Content View Controller/Help Controller/ExportController.swift index 5442585..785c159 100644 --- a/Screenshot Framer/Document Window/Content View Controller/Help Controller/ExportController.swift +++ b/Screenshot Framer/Document Window/Content View Controller/Help Controller/ExportController.swift @@ -41,6 +41,7 @@ final class ExportController { func saveSingleImage(viewState: ViewState) -> [LayoutError] { self.shouldCancel = false + let fileManager = FileManager() let viewStateController = ViewStateController(viewState: viewState) let layoutController = LayoutController(viewStateController: viewStateController, languageController: self.languageController, fileController: self.fileController) guard let view = layoutController.layouthierarchy(layers: self.lastLayerState.layers) else { return [.noLayers] } @@ -48,6 +49,7 @@ final class ExportController { let data = view.pngData() guard let url = self.fileController.outputURL(for: self.lastLayerState, viewState: viewState) else { return [.noOutputFile] } + try? fileManager.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true, attributes: nil) try? data?.write(to: url, options: .atomic) return layoutController.layoutErrors diff --git a/Screenshot Framer/Supporting Files/Info.plist b/Screenshot Framer/Supporting Files/Info.plist index b2ed262..bbf8be0 100644 --- a/Screenshot Framer/Supporting Files/Info.plist +++ b/Screenshot Framer/Supporting Files/Info.plist @@ -38,9 +38,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3 + 0.3.1 CFBundleVersion - 3 + 4 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright