I've come across an issue during a cron run where flashvideo attempts to import files from a folder. My files are uploaded via ftp to my site folder's file directory (sites/mysite.co.uk/files/video_import), but upon a cron run, I get a message like this in my log:
The selected file sites/mysite.co.uk/files/video_import/video-1.avi could not be uploaded, because the destination could not be found, or because its permissions do not allow the file to be written.
I found that it's caused by the file_munge_filename function, which renames the entire path, and not the filename (causing mysite.co.uk to become mysite.co_.uk), thereby causing the error.
The attached patch moves the munge command to affect only the filename.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | file_import_correction.patch | 4.09 KB | wayfarer_boy |
| file_import_correction.patch | 4.41 KB | wayfarer_boy |
Comments
Comment #1
wayfarer_boy commentedAologies, the patch was ineffective, I didn't test it correctly. Here's a better one that does what it intended!
Comment #2
attheshow commentedI haven't ever had the "directory being renamed" issue appear on any of my systems. Can anyone else duplicate this issue?
Comment #3
robin monks commentedThis patch solved my import problems on multisite.