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

Commit 64cccc85 authored by Romain Hunault's avatar Romain Hunault 🚴🏻
Browse files

Merge branch 'missing_mgrtn_fix' into 'master'

Added check for whether file exists for migration file path

Closes e/backlog#2796

See merge request e/os/LineageOTA!16
parents 3cf85242 8e99ec3c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -245,9 +245,10 @@
        public function getIsUpgradeSupported($compareVersion)
        {
            $isSameVersion = boolval(!strcmp($this->androidVersion, $compareVersion)); // Check if Android version is same

            $migrationContents = NULL;
            if(file_exists($this->migrationFilePath)) {
                $migrationContents = file_get_contents($this->migrationFilePath);

            }
            if (!empty($migrationContents)) {
                $migrations = json_decode($migrationContents, true); // Contains migration rules