File put contents fails if you try to put a file in a directory that doesn't exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2122617-file_put_contents-directory_2.patch | 726 bytes | nevergone |
| #1 | 2122617-file_put_contents-directory.patch | 578 bytes | nevergone |
File put contents fails if you try to put a file in a directory that doesn't exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2122617-file_put_contents-directory_2.patch | 726 bytes | nevergone |
| #1 | 2122617-file_put_contents-directory.patch | 578 bytes | nevergone |
Comments
Comment #1
nevergoneNeeds work.
Comment #2
gregglesFrom the top of the patch:
file_check_directory should handle this with FILE_CREATE_DIRECTORY as an argument, right? You shouldn't to explicitly mkdir.
Comment #3
nevergone@greggles This is wrong.
$file_dir = file_directory_path();
so $file_dir == sites/default/files'
He had a bad variable name.
Comment #4
gregglesThis seems like it could be a good change. I don't use 6.x any more so I'd like to get this RTBC'd by someone else who can test it.
Comment #5
betz commentedCan you check the following issue first? This also checks for recursive folders, which doesn't work currently.
#2159705: Not checking files directory recursively before save
I start from a empty files folder, so the folders get created, and would make this patch obsolete...
Comment #6
samuel.mortensonI think this issue can be closed as issue #2159705 includes a reviewed patch which addresses this problem in addition to creating directories recursively.
Comment #7
gregglesOkeydoke.