mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- screensaver: remove trailing slash from screensaver_dir
This commit is contained in:
@@ -114,7 +114,16 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
|
||||
|
||||
bool CScreenSaver::ReadDir()
|
||||
{
|
||||
char* dir_name = (char *) g_settings.screensaver_dir.c_str();
|
||||
std::string d = g_settings.screensaver_dir;
|
||||
if (d.length() > 1)
|
||||
{
|
||||
//remove trailing slash
|
||||
std::string::iterator it = d.end() - 1;
|
||||
if (*it == '/')
|
||||
d.erase(it);
|
||||
}
|
||||
|
||||
char *dir_name = (char *) d.c_str();
|
||||
struct dirent *dirpointer;
|
||||
DIR *dir;
|
||||
char curr_ext[5];
|
||||
|
Reference in New Issue
Block a user