[PC-BSD Commits] r21667 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Wed Feb 27 11:22:42 PST 2013


Author: kenmoore
Date: 2013-02-27 19:22:42 +0000 (Wed, 27 Feb 2013)
New Revision: 21667

Modified:
   pcbsd-projects/PCDM/pcdm-xprocess.cpp
Log:
Add a check for setting the LANG variable to make sure it is valid.



Modified: pcbsd-projects/PCDM/pcdm-xprocess.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-xprocess.cpp	2013-02-27 19:19:37 UTC (rev 21666)
+++ pcbsd-projects/PCDM/pcdm-xprocess.cpp	2013-02-27 19:22:42 UTC (rev 21667)
@@ -65,7 +65,8 @@
   environ.insert("LOGNAME",xuser); //Login name
   environ.insert("USERNAME",xuser); // Username
   environ.insert("PATH",environ.value("PATH")+":"+xhome+"/bin"); // Append the user's home dir to the path
-  environ.insert("LANG",langCode+"."+environ.value("MM_CHARSET")); //Set the proper localized language
+  if(!environ.value("MM_CHARSET").isEmpty()){ langCode.append( "."+environ.value("MM_CHARSET") ); }
+  environ.insert("LANG",langCode); //Set the proper localized language
   environ.insert("MAIL","/var/mail/"+xuser); //Set the mail variable
   environ.insert("GROUP",xuser); //Set the proper group id
   environ.insert("SHLVL","1"); //Set the proper shell level



More information about the Commits mailing list