Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
4dfdeb4a
Commit
4dfdeb4a
authored
Nov 25, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use utf8 directory wrappers
parent
9f30d0ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
modules/gui/skins2/src/theme_repository.cpp
modules/gui/skins2/src/theme_repository.cpp
+8
-9
No files found.
modules/gui/skins2/src/theme_repository.cpp
View file @
4dfdeb4a
...
...
@@ -95,16 +95,18 @@ ThemeRepository::~ThemeRepository()
}
void
ThemeRepository
::
parseDirectory
(
const
string
&
rDir
)
void
ThemeRepository
::
parseDirectory
(
const
string
&
rDir
_locale
)
{
DIR
*
pDir
;
struct
dirent
*
pDirContent
;
char
*
p
sz
DirContent
;
vlc_value_t
val
,
text
;
// Path separator
const
string
&
sep
=
OSFactory
::
instance
(
getIntf
()
)
->
getDirSeparator
();
// Open the dir
pDir
=
opendir
(
rDir
.
c_str
()
);
// FIXME: parseDirectory should be invoked with UTF-8 input instead!!
string
rDir
=
sFromLocale
(
rDir_locale
);
pDir
=
utf8_opendir
(
rDir
.
c_str
()
);
if
(
pDir
==
NULL
)
{
...
...
@@ -113,13 +115,10 @@ void ThemeRepository::parseDirectory( const string &rDir )
return
;
}
// Get the first directory entry
pDirContent
=
(
dirent
*
)
readdir
(
pDir
);
// While we still have entries in the directory
while
(
p
DirContent
!=
NULL
)
while
(
(
psz
DirContent
=
utf8_readdir
(
pDir
)
)
!=
NULL
)
{
string
name
=
pDirContent
->
d_name
;
string
name
=
p
sz
DirContent
;
string
extension
;
if
(
name
.
size
()
>
4
)
{
...
...
@@ -142,7 +141,7 @@ void ThemeRepository::parseDirectory( const string &rDir )
delete
[]
text
.
psz_string
;
}
p
DirContent
=
(
dirent
*
)
readdir
(
pDir
);
free
(
psz
DirContent
);
}
closedir
(
pDir
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment