diff options
author | George Joseph <gjoseph@digium.com> | 2016-04-24 21:51:16 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-04-25 18:17:28 -0500 |
commit | 284bb814ac09a10e3bababa2e126d69d16fd93c4 (patch) | |
tree | 3bd2a372ba65c38c62274b3ca18730ff1103dd08 /funcs | |
parent | 99fcf2a791c2c78ae0ffffce2ac3e8db18ca5be0 (diff) |
config: Fix ast_config_text_file_save2 writability check for missing files
A patch I did back in 2014 modified ast_config_text_file_save2 to check the
writability of the main file and include files before truncating and re-writing
them. An unintended side-effect of this was that if a file doesn't exist,
the check fails and the write is aborted.
This patch causes ast_config_text_file_save2 to check the writability of the
parent directory of missing files instead of checking the file itself. This
allows missing files to be created again. A unit test was also added to
test_config to test saving of config files.
The regression was discovered when app_voicemail's passwordlocation=spooldir
feature stopped working.
ASTERISK-25917 #close
Reported-by: Jonathan Rose
Change-Id: Ic4dbe58c277a47b674679e49daed5fc6de349f80
Diffstat (limited to 'funcs')
0 files changed, 0 insertions, 0 deletions