I have written a patch for this problem. The error happens because Totem doesn't take into account device paths with '..' in their name; this happens on my system because I have:

/dev/cdroms/cdrom1 -> ../ide/host0/bus1/target1/lun0/cd

So Totem gets the device path "/dev/../ide/host0/bus1/target1/lun0/cd", which != "/dev/ide/host0/bus1/target1/lun0/cd" in the check on totem-disc.c:197.

To correct this I altered totem_disc_resolve_link to canonicalise the path it returns. I have also fixed a bug in debian/rules that prevented the CFLAGS set in the Makefile from being passed to configure, and hence the build process.

Regards,

--
Sam Morris
http://robots.org.uk/

PGP key id 5EA01078
Fingerprint 3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078
#! /bin/sh /usr/share/dpatch/dpatch-run
## totem-realpath.dpatch by Sam Morris <[EMAIL PROTECTED]>
##
## DP: Fixes totem's handling of '..' and '.' components in device names.

@DPATCH@
diff -urNad totem-0.100/debian/rules /tmp/dpep.tMQYmH/totem-0.100/debian/rules
--- totem-0.100/debian/rules    2005-02-12 18:01:03.000000000 +0000
+++ /tmp/dpep.tMQYmH/totem-0.100/debian/rules   2005-02-12 18:13:09.000000000 
+0000
@@ -35,7 +35,7 @@
          $(MAKE) distclean; \
          rm -f build-gstreamer-stamp; \
        fi
-       ./configure --prefix=/usr --sysconfdir=/etc 
--mandir=\$${prefix}/share/man --libexecdir=\$${prefix}/lib/totem
+       ./configure --prefix=/usr --sysconfdir=/etc 
--mandir=\$${prefix}/share/man --libexecdir=\$${prefix}/lib/totem 
CFLAGS="$(CFLAGS)"
        $(MAKE)
        touch build-xine-stamp
 
diff -urNad totem-0.100/src/totem-disc.c 
/tmp/dpep.tMQYmH/totem-0.100/src/totem-disc.c
--- totem-0.100/src/totem-disc.c        2005-01-02 23:18:39.000000000 +0000
+++ /tmp/dpep.tMQYmH/totem-0.100/src/totem-disc.c       2005-02-12 
18:13:09.000000000 +0000
@@ -65,17 +65,20 @@
 static char *
 totem_disc_resolve_link (const char *dev, const char *buf)
 {
-  char *parent, *new;
+  char *parent, *new, *result;
 
   /* is it an absolute path? */
-  if (g_path_is_absolute (buf) != FALSE)
-    return g_strdup (buf);
-
-  parent = g_path_get_dirname (dev);
-  new = g_build_filename (parent, buf, NULL);
-  g_free (parent);
+  if (g_path_is_absolute (buf) != FALSE) {
+    result = realpath (buf, NULL);
+  } else {
+    parent = g_path_get_dirname (dev);
+    new = g_build_filename (parent, buf, NULL);
+    result = realpath (new, NULL);
+    g_free (new);
+    g_free (parent);
+  }
 
-  return new;
+  return result;
 }
 
 /*

Reply via email to