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

Commit 906c75f3 authored by Akhil's avatar Akhil 🙂
Browse files

Added line to save prop file in case it doesn't exist

parent 8fd313d2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -79,7 +79,11 @@
            // Try to load the build.prop from two possible paths:
            // - builds/CURRENT_ZIP_FILE.zip/system/build.prop
            // - builds/CURRENT_ZIP_FILE.zip.prop ( which must exist )
            $this->buildProp = explode( "\n", @file_get_contents($this->getPropFilePath()));
            $prop_contents = @file_get_contents($this->getPropFilePath());
            if(!file_exists($this->filePath.'.prop')) {
                file_put_contents($this->filePath . 'prop', $prop_contents)
            }
            $this->buildProp = explode( "\n", $prop_contents);
            // Try to fetch build.prop values. In some cases, we can provide a fallback, in other a null value will be given
            $this->timestamp = intval( $this->getBuildPropValue( 'ro.build.date.utc' ) ?? filemtime($this->filePath) );
            $this->incremental = $this->getBuildPropValue( 'ro.build.version.incremental' ) ?? '';