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

resolveDestPath doesn't work on Windows #6

Open
durach opened this issue Aug 16, 2011 · 1 comment
Open

resolveDestPath doesn't work on Windows #6

durach opened this issue Aug 16, 2011 · 1 comment
Labels

Comments

@durach
Copy link

durach commented Aug 16, 2011

if on windows we run:

->set('data/'temp/file.jpg')->move('data/images/image.jpg')

execution fails w/o error. It probably returns false, but I expect CException.

It fails because resolveDestPath doesn't work correctly on Windows. In my example it will return

'data/temp\data/temp/file.jpg'

This happens because of the following lines on code:

if (strpos($fileDest, DIRECTORY_SEPARATOR)===false)
            return $this->dirname.DIRECTORY_SEPARATOR.$fileDest;

Which probably intended to work as ->set('/path/to/filename')->rename('anotherfilename')

We used to use '/' in all paths in our code and PHP functions work with it correctly.

@idlesign
Copy link
Owner

I'll look at that next time I happen to Windows %)

Do not forget: it's GitHub — you are free to fork the project and make the appropriate changes.

@idlesign idlesign added the bug label Feb 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants