From e0bcd5bddd75d3a0054e94c577d786889dd2cf4b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 8 Feb 2015 13:07:51 +0100 Subject: [PATCH] hdd_menu: also recognize recordingdir if it is a symlink ...like "/media/by-label/foo/movies", no need to reset configuration in that case Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/17395a7fed2cc12a20fe239726fcd417aa8a301a Author: Stefan Seyfried Date: 2015-02-08 (Sun, 08 Feb 2015) ------------------ This commit was generated by Migit --- src/gui/hdd_menu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 16837dc46..9c9bbb1bc 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -390,6 +390,14 @@ void CHDDMenuHandler::setRecordPath(std::string &dev) printf("CHDDMenuHandler::setRecordPath: recordingdir already set to %s\n", newpath.c_str()); return; } + /* don't annoy if the recordingdir is a symlink pointing to the 'right' location */ + string readl = backtick("readlink -f " + g_settings.network_nfs_recordingdir); + readl = trim(readl); + if (newpath.compare(readl) == 0) { + printf("CHDDMenuHandler::%s: recordingdir is a symlink to %s\n", + __func__, newpath.c_str()); + return; + } bool old_menu = in_menu; in_menu = false; int res = ShowMsg(LOCALE_RECORDINGMENU_DEFDIR, LOCALE_HDD_SET_RECDIR, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo);