diff options
author | Jeremy Allison <jra@samba.org> | 2000-08-11 00:53:13 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-08-11 00:53:13 +0000 |
commit | 295d684f538ccb1e7e7cef886791eec68d937f3f (patch) | |
tree | 898aca6d81cf8d4a2764f5b098b820553af017bc /source3/param/loadparm.c | |
parent | 137b7f873a7885a9ee30871403229e338a8a4a04 (diff) | |
download | samba-295d684f538ccb1e7e7cef886791eec68d937f3f.tar.gz samba-295d684f538ccb1e7e7cef886791eec68d937f3f.tar.bz2 samba-295d684f538ccb1e7e7cef886791eec68d937f3f.zip |
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)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 8 |
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); } |