summaryrefslogtreecommitdiff
path: root/txtrecv.c
diff options
context:
space:
mode:
Diffstat (limited to 'txtrecv.c')
-rw-r--r--txtrecv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/txtrecv.c b/txtrecv.c
index 68bef84..c6d039f 100644
--- a/txtrecv.c
+++ b/txtrecv.c
@@ -192,8 +192,12 @@ void Storage::getFilename(char *buffer, int bufLength, PageID page) {
void Storage::prepareDirectory(tChannelID chan) {
free(currentDir);
- asprintf(&currentDir, "%s/%s", root, *chan.ToString());
- MakeDirs(currentDir, 1);
+ if (asprintf(&currentDir, "%s/%s", root, *chan.ToString()) == -1 ||
+ !MakeDirs(currentDir, 1)) {
+ esyslog("OSD-Teletext: Error preparing directory for channel \"%s\"",
+ *chan.ToString());
+ return;
+ }
failedFreeSpace=false;
}