The docs for $dest should specify it must be a Drupal writeable files directory. I have been trying to pass it a path in Linux outside of web root, not knowing this would not work. Only when I tracked through the functions called (file_move() calls file_copy() which calls file_check_path() which requires that the path to be checked is in the files dir).
The same bug applies to file_copy()
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 590088b-D6.patch | 4.17 KB | jhodgdon |
| #1 | 590088-D6.patch | 4.18 KB | jhodgdon |
Comments
Comment #1
jhodgdonThis appears to be a Drupal 6 only doc issue, since in Drupal 7 the doc states that $destination must be a Drupal stream wrapper.
Here's a patch to fix the doc up for Drupal 6. General cleanup of doc of these two functions, as well as fixing the problem identified above.
Just a note: the destination can also be in the temp directory as well as files.
Comment #2
jhodgdonSorry, there was a typo in that patch. Try this one instead.
Comment #3
jhodgdonThis must have been fixed in another issue.