Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
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
*
p
DirContent
;
char
*
psz
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
(
pDirContent
!=
NULL
)
while
(
(
pszDirContent
=
utf8_readdir
(
pDir
)
)
!=
NULL
)
{
string
name
=
p
DirContent
->
d_name
;
string
name
=
p
szDirContent
;
string
extension
;
if
(
name
.
size
()
>
4
)
{
...
...
@@ -142,7 +141,7 @@ void ThemeRepository::parseDirectory( const string &rDir )
delete
[]
text
.
psz_string
;
}
pDirContent
=
(
dirent
*
)
readdir
(
pDir
);
free
(
pszDirContent
);
}
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