Update FileManager.php

This commit is contained in:
Bozhidar 2024-05-13 16:47:49 +03:00
parent b6e66da6f6
commit d78bc716f4

View file

@ -53,12 +53,11 @@ class FileManager extends Component
public function back() public function back()
{ {
$this->canIBack = false;
$newRealPath = dirname($this->currentRealPath); $newRealPath = dirname($this->currentRealPath);
if (Str::startsWith($newRealPath, $this->domainHomeRoot)) { if (Str::startsWith($newRealPath, $this->domainHomeRoot)) {
$this->currentRealPath = $newRealPath; $this->currentRealPath = $newRealPath;
} else {
$this->canIBack = false;
} }
} }