diff --git a/src/Helpers/Build.php b/src/Helpers/Build.php index 1c83cf72736d7273d99fc7ed0f591fe4e571686b..485249eaf17340c048262806dcbb711ff49470b0 100644 --- a/src/Helpers/Build.php +++ b/src/Helpers/Build.php @@ -74,7 +74,7 @@ $tokens = $this->removeTrailingDashes($tokens); - $this->filePath = $physicalPath . '/' . $fileName; + $this->filePath = (substr($physicalPath, -1) === '/') ? $physicalPath . $fileName : $physicalPath . '/' . $fileName; $this->migrationFilePath = $physicalPath . '/migration_paths.json'; $this->channel = $this->_getChannel(str_replace(range(0, 9), '', $tokens[4]), $tokens[1], $tokens[2]); $this->filename = $fileName; @@ -88,7 +88,7 @@ $this->incremental = $this->getBuildPropValue('ro.build.version.incremental') ?? ''; $this->apiLevel = $this->getBuildPropValue('ro.build.version.sdk') ?? ''; $this->model = $this->getBuildPropValue('ro.lineage.device') ?? $this->getBuildPropValue('ro.cm.device') ?? ($tokens[1] == 'cm' ? $tokens[6] : $tokens[5]); - $this->version = $tokens[2][0]; + $this->version = $tokens[2]; $this->displayVersion = $this->getBuildPropValue('ro.cm.display.version') ?? $this->getBuildPropValue('ro.lineage.display.version') ?? ''; $this->androidVersion = $this->getBuildPropValue('ro.build.version.release') ?? ''; $this->uid = hash('sha256', $this->timestamp.$this->model.$this->apiLevel, false);