diff --git a/library/think/File.php b/library/think/File.php index 43f38575..60a16417 100644 --- a/library/think/File.php +++ b/library/think/File.php @@ -39,7 +39,7 @@ class File extends SplFileObject public function __construct($filename, $mode = 'r') { parent::__construct($filename, $mode); - $this->filename = $this->getRealPath(); + $this->filename = $this->getRealPath() ?: $this->getPathname(); } /**