From 1032d0a273688c091e12c0b7623363c1ed05baa5 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 30 May 2014 18:18:46 +0400 Subject: [PATCH] driver/record.cpp: create record directory before record Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3124ed62cf0724b0f5938cb66f71678932834130 Author: [CST] Focus Date: 2014-05-30 (Fri, 30 May 2014) --- src/driver/record.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 4bfc8a529..12bfc3e20 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -631,9 +631,11 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel) std::string ext_channel_name; unsigned int pos; + safe_mkdir(Directory.c_str()); if(check_dir(Directory.c_str())) { /* check if Directory and network_nfs_recordingdir the same */ if(g_settings.network_nfs_recordingdir != Directory) { + safe_mkdir(g_settings.network_nfs_recordingdir.c_str()); /* not the same, check network_nfs_recordingdir and return error if not ok */ if(check_dir(g_settings.network_nfs_recordingdir.c_str())) return RECORD_INVALID_DIRECTORY;