From 295d684f538ccb1e7e7cef886791eec68d937f3f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 11 Aug 2000 00:53:13 +0000 Subject: Fix case where volumename could be returned as UNIX charset or DOS codepage depending on where it came from. Jeremy. (This used to be commit cfbf78085d48671e5be382e7486953a85a893be1) --- source3/param/loadparm.c | 8 ++++++-- 1 file 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); } -- cgit