]> git.phdru.name Git - extfs.d.git/blobdiff - obexftp
Version 1.0.1. Fixed a bug - base_name have been changed to transport.
[extfs.d.git] / obexftp
diff --git a/obexftp b/obexftp
index 5aa46c523b9b957898e6507927b6a05a70b52382..8d4906d1639152e3e4ea7426f79608521336225b 100755 (executable)
--- a/obexftp
+++ b/obexftp
@@ -28,7 +28,7 @@ Create somewhere a transport file. The transport file can have any name, and is
 expected to be a text file with at least one line defining the transport to
 your device. Other lines in the file are ignored.
 
-First word in the line is a transport name - Bluetooth, IrDA or TTY. The name
+First word in the line is a transport name - Bluetooth, TTY or IrDA. The name
 is case-insensitive.
 
 For the Bluetooth transport put there a line "Bluetooth CP:AD:RE:SS channel",
@@ -37,7 +37,7 @@ and channel is the OBEX File Transfer channel; you can discover the address and
 the channel for your device by using commands like "hcitool scan" and "sdptool
 browse".
 
-For the TTY put a device name: "tty /dev/rfcomm0".
+For the TTY put the device name: "tty /dev/ttyUSB0".
 
 For the IrDA: just put "IrDA" in the file.
 
@@ -52,9 +52,9 @@ directories quickly.
 
 """
 
-__version__ = "1.0.0"
-__revision__ = "$Id: obexftp,v 1.10 2004/06/19 17:32:52 phd Exp $"
-__date__ = "$Date: 2004/06/19 17:32:52 $"[7:-2]
+__version__ = "1.0.1"
+__revision__ = "$Id: obexftp,v 1.12 2004/06/23 16:05:34 phd Exp $"
+__date__ = "$Date: 2004/06/23 16:05:34 $"[7:-2]
 __author__ = "Oleg Broytmann <phd@phd.pp.ru>"
 __copyright__ = "Copyright (C) 2004 PhiloSoft Design"
 
@@ -90,10 +90,10 @@ Put it in /usr/lib/mc/extfs. For more information read the source!""" % (
 def setup_transport():
    """Setup transport parameters for the obexftp program"""
    transport_file = open(sys.argv[2], 'r')
-   line = transport_file.readline().strip()
+   line = transport_file.readline()
    transport_file.close()
 
-   parts = line.split()
+   parts = line.strip().split()
    transport = parts[0].lower()
 
    if transport == "bluetooth":
@@ -103,7 +103,7 @@ def setup_transport():
    elif transport == "irda":
       return "-i"
    else:
-      error("Unknown transport '%s'; expected 'bluetooth', 'tty' or 'irda'" % base_filename)
+      error("Unknown transport '%s'; expected 'bluetooth', 'tty' or 'irda'" % transport)
 
 
 # Parse ObexFTP XML directory listings