Sandbox: save file next to selected file

My application uses Valentina as database which can create SQL dumps when the database is corrupted. I select a location with a SaveAsDialog and the data is written. Works fine even for the Sandbox.

Now there is a new version of creating a dump file called DumpEx which writes largish amounts of binary data into a second file next to the dump file. For the non-sandboxed version this is simple to solve. I have a standard name and do a

dim DataFile as FolderItem = DumpFolderitem.Parent.Child(kDumpDatafile)

This fails when the app is sandboxed because I don’t have write access to the second file.

What is the easiest solution to solve this? Show a second SaveAsDialog? Can I get write access to the parent folder? Can I simply write the files to the desktop? If I use the second SaveAsDialog I will need to show 2 file selection dialogs when loading the Dump file.

Yup; that’s not allowed. Causes all kind of frustration with databases.

IMHO, I would recommend asking the user to select a folder to write the files too, then have the tools create the files into that folder.

Thanks, Sam. I’ll try the folder selection.

As an optional “Mac like” alternative, you could write the two files to temporary, zip them with MBS, and move the ZIP to the selected save file destination.