aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9277cdcb3..35cd65db3 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2704,8 +2704,16 @@ static int remove_file(char *dir, int msgnum)
if (msgnum > -1) {
snprintf(msgnums, sizeof(msgnums), "%d", msgnum);
make_file(fn, sizeof(fn), dir, msgnum);
- } else
+ } else {
+#ifndef IMAP_STORAGE
ast_copy_string(fn, dir, sizeof(fn));
+#else
+ /*IMAP stores greetings locally so it should not
+ * try to dispose of them
+ */
+ return 0;
+#endif
+ }
ast_filedelete(fn, NULL);
snprintf(full_fn, sizeof(full_fn), "%s.txt", fn);
unlink(full_fn);