Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File::move is not moving file #1785

Closed
hwiesmann opened this issue Mar 2, 2019 · 4 comments
Closed

File::move is not moving file #1785

hwiesmann opened this issue Mar 2, 2019 · 4 comments

Comments

@hwiesmann
Copy link

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
@jim-parry jim-parry added this to the 4.0.0-beta.2 milestone Mar 5, 2019
@bangbangda
Copy link
Contributor

😮 When you upload a file, you can move the file normally.
But, new CodeIgniter\Files\File('/tmp/user-12.png') will fail.

bangbangda added a commit to bangbangda/CodeIgniter4 that referenced this issue Mar 11, 2019
bangbangda added a commit to bangbangda/CodeIgniter4 that referenced this issue Mar 13, 2019
lonnieezell added a commit that referenced this issue Mar 20, 2019
@atishhamte
Copy link
Contributor

I guess, this is fixed in #1809

@jim-parry
Copy link
Contributor

@hwiesmann Can you confirm that this has been fixed?

@hwiesmann
Copy link
Author

@jim-parry Works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants