summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--lib/mouse.pm1
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index e9851ef..3c49351 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- fix device /dev/input/by-id/usb-$ID_SERIAL-event-mouse for wacoms
+ when the ID_SERIAL contains special chars
+
Version 0.38 - 1 November 2007, by Anssi Hannula
- display message "This setting will be activated after the installation."
diff --git a/lib/mouse.pm b/lib/mouse.pm
index 8440ddd..1c776ba 100644
--- a/lib/mouse.pm
+++ b/lib/mouse.pm
@@ -249,6 +249,7 @@ sub probe_usb_wacom_devices() {
map {
my $ID_SERIAL = chomp_(run_program::get_stdout('/lib/udev/usb_id', $_->{sysfs_path}));
+ $ID_SERIAL =~ s/[^\w#+\-.:=@_]/_/g; #- udev do a further cleanup, eg: "Wacom_Co.,Ltd._MTE-450" => "Wacom_Co._Ltd._MTE-450". cf ALLOWED_CHARS udev.h
my $sysfs_device = "input/by-id/usb-$ID_SERIAL-event-mouse"; #- from /etc/udev/rules.d/60-persistent-input.rules
if ($::isInstall || -e "/dev/$sysfs_device") {
$sysfs_device;