Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93ac7a0b authored by Ethan Yonker's avatar Ethan Yonker Committed by Dees Troy
Browse files

Check if mount point is dir during startup

7.0 trees tend to create a /vendor symlink in the root of the
ramdisk. TWRP needs to delete the symlink and mkdir to be able to
mount the partition properly.

Change-Id: Ia338739e07ca16ccd2492ea1fec2f5e99cfc08eb
parent 79ae093c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -778,6 +778,8 @@ bool TWPartition::Is_Image(string File_System) {
}

bool TWPartition::Make_Dir(string Path, bool Display_Error) {
	if (TWFunc::Get_D_Type_From_Stat(Path) != S_IFDIR)
		unlink(Path.c_str());
	if (!TWFunc::Path_Exists(Path)) {
		if (mkdir(Path.c_str(), 0777) == -1) {
			if (Display_Error)