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: 17395a7fed
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-02-08 (Sun, 08 Feb 2015)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2015-02-08 13:07:51 +01:00
committed by Jacek Jendrzej
parent 2ea2d02303
commit e0bcd5bddd

View File

@@ -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);