Skip to content

Commit 0faeacf

Browse files
committed
Small improvement
Slightly shorter/better version of the command used to create and mount a hidden ramdisk. Still looking for an even better alternative though.
1 parent 1975266 commit 0faeacf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TmpDisk/Classes/TmpDiskManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ + (bool)createTmpDiskWithName:(NSString*)name size:(u_int64_t)size autoCreate:(b
9292

9393
NSString *command;
9494
if (hidden) {
95-
NSString *pattern = @"d=$(hdiutil attach -nomount ram://%llu) && diskutil partitionDisk $d 1 GPT HFS+ %%noformat%% 100%% && "
95+
NSString *pattern = @"d=$(hdiutil attach -nomount ram://%llu) && diskutil eraseDisk HFS+ %%noformat%% $d && "
9696
@"newfs_hfs -v \"%@\" \"$(echo $d | tr -d ' ')s1\" && hdiutil attach -nomount $d && "
9797
@"hdiutil attach -nobrowse \"$(echo $d | tr -d ' ')s1\"";
9898

0 commit comments

Comments
 (0)