mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
neutrino.cpp: fix possible segfault , suplement to bb2efeb45b
This commit is contained in:
@@ -561,6 +561,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
if(g_settings.auto_delete) {
|
if(g_settings.auto_delete) {
|
||||||
if(strcmp(g_settings.timeshiftdir, g_settings.network_nfs_recordingdir)) {
|
if(strcmp(g_settings.timeshiftdir, g_settings.network_nfs_recordingdir)) {
|
||||||
DIR *d = opendir(timeshiftDir);
|
DIR *d = opendir(timeshiftDir);
|
||||||
|
if(d){
|
||||||
while (struct dirent *e = readdir(d))
|
while (struct dirent *e = readdir(d))
|
||||||
{
|
{
|
||||||
std::string filename = e->d_name;
|
std::string filename = e->d_name;
|
||||||
@@ -572,6 +573,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
closedir(d);
|
closedir(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
g_settings.record_hours = configfile.getInt32( "record_hours", 4 );
|
g_settings.record_hours = configfile.getInt32( "record_hours", 4 );
|
||||||
g_settings.filesystem_is_utf8 = configfile.getBool("filesystem_is_utf8" , true );
|
g_settings.filesystem_is_utf8 = configfile.getBool("filesystem_is_utf8" , true );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user