summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/param/loadparm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 17a109dd06..0ed1dad1f7 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3267,8 +3267,12 @@ int lp_servicenumber(char *pszServiceName)
char *volume_label(int snum)
{
char *ret = lp_volume(snum);
- if (!*ret)
- return (lp_servicename(snum));
+ if (!*ret) {
+ /* lp_volume returns a unix charset - lp_servicename returns a
+ dos codepage - convert so volume_label() always returns UNIX.
+ */
+ return (dos_to_unix(lp_servicename(snum), False));
+ }
return (ret);
}