mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Fix more discovered issues
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user