mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
screensaver: remove trailing slash from screensaver_dir
Origin commit data
------------------
Branch: ni/coolstream
Commit: 20e49a492a
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-12-24 (Wed, 24 Dec 2014)
Origin message was:
------------------
- screensaver: remove trailing slash from screensaver_dir
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -114,12 +114,21 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
|
|||||||
|
|
||||||
bool CScreenSaver::ReadDir()
|
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;
|
struct dirent *dirpointer;
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
char curr_ext[5];
|
char curr_ext[5];
|
||||||
int curr_lenght;
|
int curr_lenght;
|
||||||
char* p;
|
char *p;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
v_bg_files.clear();
|
v_bg_files.clear();
|
||||||
|
Reference in New Issue
Block a user