[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdelibs/solid/solid/backends/hal
From: Ambroz Bizjak <ambro () b4ever ! net>
Date: 2008-09-23 23:41:27
Message-ID: 1222213287.145558.7518.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 864120 by abizjak:
Pass the user's locale to HAL when using the ntfs-3g driver.
If ntfs-3g is not provided a locale, it will fail to show any files
with non-ascii characters in the name, and fail to create such files.
M +12 -0 halstorageaccess.cpp
--- branches/KDE/4.1/kdelibs/solid/solid/backends/hal/halstorageaccess.cpp #864119:864120
@@ -28,6 +28,7 @@
#include <QtGui/QWidget>
#include <unistd.h>
+#include <stdlib.h>
#include "halfstabhandling.h"
@@ -308,6 +309,17 @@
}
}
}
+
+ // pass our locale to the ntfs-3g driver so it can translate local characters
+ if ( m_device->property("volume.fstype").toString()=="ntfs-3g" && halOptions.contains("locale=") ) {
+ // have to obtain LC_CTYPE as returned by the `locale` command
+ // check in the same order as `locale` does
+ char *cType;
+ if ( (cType = getenv("LC_ALL")) || (cType = getenv("LC_CTYPE")) || (cType = getenv("LANG")) ) {
+ options << "locale="+QString(cType);
+ }
+ }
+
msg << "" << "" << options;
return c.callWithCallback(msg, this,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic