Skip to content

File::move is not moving file #1785

Description

@hwiesmann

Describe the bug
File::move is not moving a file (but directories if accidentally possible)!

The line in File::move

		if (! @rename($this->getPath(), $destination))

has to be replaced by

		if (! @rename($this->getRealPath(), $destination))
``

because $this->getPath() is only referring to the directory in which the file can be found.

**CodeIgniter 4 version**
CodeIgniter4 Alpha 4

**Affected module(s)**
File

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions