Hello,
I've found that file_module can't create directory path recursively. This happens because it uses drupal's built-in file_check_directory() function which do not offer this feature. Here is small patch to avoid this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | services-767036.patch | 939 bytes | kylebrowning |
| #4 | services-767036.patch | 1.59 KB | kylebrowning |
| #2 | file_service.inc_.patch | 540 bytes | pavel.karoukin |
| file_service.inc_.patch | 561 bytes | pavel.karoukin |
Comments
Comment #2
pavel.karoukin commentedindeed =))
Comment #4
kylebrowning commentedSetting to needs review for patch test. Also IM not sure if this is needed functionality so I wont commit this patch until heyrocker signs off on it.
Comment #5
kylebrowning commentedComment #6
kylebrowning commentedSet to dev so the patch passes
Comment #7
kylebrowning commentedIm smoking crack sorry, leaving as review until test passes.
Comment #8
kylebrowning commentedOk, just waiting on heyrocker for this now , hehe.
Comment #9
kylebrowning commentedComment #10
gddI'm a little torn on this, because I feel like our file.save functionality should work under the same assumptions that core does in order to reduce confusion. Gimme a day to think about it.
Comment #11
kylebrowning commentedPrecisely why I thought it best to talk to you about it. I feel like it should be working in core, and I was not able to replicate this as a bug, but I wrote the patch anyway just in case.
Comment #12
marcingy commented#4 has somes view changes in it as well which seems wrong
Comment #13
kylebrowning commentedPatch re-roll
Comment #14
johannesdr commentedIt looks like this has been fixed in Drupal 7: #515280: file_check_directory() should create recursively
and it has also been reported for Drupal 6: #180970: file_check_directory fails to make directories if the parent doesn't already exist
The patch in #13 works for me, but wouldn't it be cleaner to do
Comment #15
kylebrowning commentedThis is a core issue and should be fixed in core soon.