Fix more discovered issues

This commit is contained in:
DariusIII
2020-03-22 22:45:48 +01:00
parent 5bca7d97e3
commit 478b0877db
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ class NZB
$nzbPath = '';
for ($i = 0; $i < $levelsToSplit && $i < 32; $i++) {
$nzbPath .= $releaseGuid[$i].DS;
$nzbPath .= $releaseGuid[$i].'/';
}
$nzbPath = $this->siteNzbPath.$nzbPath;
+1 -1
View File
@@ -145,7 +145,7 @@ class NZBExport
}
// Create a path to store the new NZB files.
$currentPath = $path.$this->safeFilename($group['name']).DS;
$currentPath = $path.$this->safeFilename($group['name']).'/';
if (! File::isDirectory($currentPath) && ! File::makeDirectory($currentPath) && ! File::isDirectory($currentPath)) {
throw new \RuntimeException(sprintf('Directory "%s" was not created', $currentPath));
}
@@ -782,7 +782,7 @@ class ProcessAdditional
protected function _createTempFolder(): bool
{
// Per release defaults.
$this->tmpPath = $this->_mainTmpPath.$this->_release->guid.DS;
$this->tmpPath = $this->_mainTmpPath.$this->_release->guid.'/';
if (! File::isDirectory($this->tmpPath)) {
if (! File::makeDirectory($this->tmpPath, 0777, true, false) && ! File::isDirectory($this->tmpPath)) {
$this->_echo('Unable to create directory: '.$this->tmpPath, 'warning');
+2 -2
View File
@@ -31,10 +31,10 @@ class Utility
public static function canExecuteRead($path)
{
$paths = explode('#/#', $path);
$fullPath = DS;
$fullPath = '/';
foreach ($paths as $singlePath) {
if ($singlePath !== '') {
$fullPath .= $singlePath.DS;
$fullPath .= $singlePath.'/';
if (! is_readable($fullPath) || ! is_executable($fullPath)) {
return "The '$fullPath' directory must be readable and executable by all .".PHP_EOL;
}