Results 1 to 5 of 5

Thread: Suggestion: Place temporary disk images in $TMPDIR instead of the destination folder

  1. #1

    Default Suggestion: Place temporary disk images in $TMPDIR instead of the destination folder

    To possibly avoid any filename collisions, my humble suggestion is to maybe place disk images that are in the process of being created inside of the `$TMPDIR` folder, and then add a custom, guid-like text string to the end of it.

    For example:

    Code:
    $TMPDIR/MyDiskImage_dropdmgtemp-42a08354-c790-4a73-8274-965ec68c59fd.dmg
    and if the filename is too long, truncate it (only for the temp file, though). For example, take a close look somewhat near the end of the filenames:

    Code:
    $TMPDIR/ccccccdssdftgsdfgsdfgdsfgdsfgdsfgdsfgdsfgdsfgdsfgdsgdsfggdfsdfggdfsdsgfgfdsdfgsdfgsdsgfgdsfgdfsccccccdssdftgsdfgsdfgdsfgdsfgdsfgdsfgdsfgdsfgdsfgdsgdsfggdfsdfggdfsdsgfgfdsdfgsdfgsdsgfgdsfgdfsdddddddddAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz_dropdmgtemp-29c117b0-9ca9-43cb-a625-4614eecbff35.dmg
    would get truncated to:

    Code:
    $TMPDIR/ccccccdssdftgsdfgsdfgdsfgdsfgdsfgdsfgdsfgdsfgdsfgdsgdsfggdfsdfggdfsdsgfgfdsdfgsdfgsdsgfgdsfgdfsccccccdssdftgsdfgsdfgdsfgdsfgdsfgdsfgdsfgdsfgdsfgdsgdsfggdfsdfggdfsdsgfgfdsdfgsdfgsdsgfgdsfgdfsdddddddddAaB_dropdmgtemp-29c117b0-9ca9-43cb-a625-4614eecbff35.dmg
    Hope this makes sense and proves to be somewhat useful.

  2. #2

    Default

    Forgot to add:

    And then, after creation, the disk image would be moved to its specified destination.

  3. #3

    Default

    Quote Originally Posted by beavisandbutthead1992 View Post
    To possibly avoid any filename collisions, my humble suggestion is to maybe place disk images that are in the process of being created inside of the `$TMPDIR` folder, and then add a custom, guid-like text string to the end of it.
    Collisions with what? DropDMG already checks to make sure it’s using a unique filename. Using $TMPDIR is problematic because that volume might not have as much space as the chosen destination drive and could leak sensitive data because it’s encrypted differently (or not at all).

  4. #4

    Default

    Good points, I didn't think of those. The only reason I brought up the idea was because I wasn't sure if DropDMG could/would accidentally overwrite a file with _temp.xxx at the end of its filename.

  5. #5

    Default

    Quote Originally Posted by beavisandbutthead1992 View Post
    The only reason I brought up the idea was because I wasn't sure if DropDMG could/would accidentally overwrite a file with _temp.xxx at the end of its filename.
    Nope, DropDMG won’t overwrite any files. It will make sure it doesn’t create two temp files with the same name, and leave any temp files created by other apps/scripts in place.

Similar Threads

  1. Index in Place
    By Andy Bobyarchick in forum EagleFiler
    Replies: 1
    Last Post: 09-02-2018, 01:03 PM
  2. Sparse Disk Images
    By michael@wengam in forum DropDMG
    Replies: 2
    Last Post: 06-29-2010, 02:18 PM
  3. Making Mac Disk Images Pretty
    By Michael Tsai in forum DropDMG
    Replies: 1
    Last Post: 06-29-2010, 02:11 PM
  4. Storing Data on Encrypted Disk Images
    By donperreault in forum EagleFiler
    Replies: 2
    Last Post: 05-30-2007, 11:47 AM
  5. Clearing the temporary file??
    By thienedits in forum DropDMG
    Replies: 6
    Last Post: 05-01-2007, 08:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •