Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
41efc137
Commit
41efc137
authored
Nov 30, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/Config: swap #if/#else
parent
0f350167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Config.cxx
src/fs/Config.cxx
+7
-7
No files found.
src/fs/Config.cxx
View file @
41efc137
...
...
@@ -37,13 +37,7 @@ ConfigureFS(Error &error)
charset
=
config_get_string
(
CONF_FS_CHARSET
,
nullptr
);
if
(
charset
==
nullptr
)
{
#ifndef WIN32
const
gchar
**
encodings
;
g_get_filename_charsets
(
&
encodings
);
if
(
encodings
[
0
]
!=
nullptr
&&
*
encodings
[
0
]
!=
'\0'
)
charset
=
encodings
[
0
];
#else
#ifdef WIN32
/* Glib claims that file system encoding is always utf-8
* on native Win32 (i.e. not Cygwin).
* However this is true only if <gstdio.h> helpers are used.
...
...
@@ -52,6 +46,12 @@ ConfigureFS(Error &error)
static
char
win_charset
[
13
];
sprintf
(
win_charset
,
"cp%u"
,
GetACP
());
charset
=
win_charset
;
#else
const
gchar
**
encodings
;
g_get_filename_charsets
(
&
encodings
);
if
(
encodings
[
0
]
!=
nullptr
&&
*
encodings
[
0
]
!=
'\0'
)
charset
=
encodings
[
0
];
#endif
}
...
...
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