From e60e467129402c69d32e7174e8a6a3f6bae0112e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 13 Jun 2004 19:47:25 +0000 Subject: [PATCH] CopyIn (put a file into a directory in the phone's filesystem). git-svn-id: file:///home/phd/archive/SVN/mc-extfs/trunk@12 1a6e6372-1aea-0310-bd00-dc960550e1df --- obexftp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/obexftp b/obexftp index a0b9a4d..6149cdd 100755 --- a/obexftp +++ b/obexftp @@ -37,9 +37,9 @@ make the scanning process faster. Midnight Commander caches the result. """ -__version__ = "0.2.0" -__revision__ = "$Id: obexftp,v 1.3 2004/06/13 19:41:52 phd Exp $" -__date__ = "$Date: 2004/06/13 19:41:52 $"[7:-2] +__version__ = "0.3.0" +__revision__ = "$Id: obexftp,v 1.4 2004/06/13 19:47:25 phd Exp $" +__date__ = "$Date: 2004/06/13 19:47:25 $"[7:-2] __author__ = "Oleg Broytmann " __copyright__ = "Copyright (C) 2004 PhiloSoft Design" @@ -220,11 +220,14 @@ def mcobex_copyin(): obexftp_args = setup_transport() dummy_filename = sys.argv[3] real_filename = sys.argv[4] + dirname, filname = os.path.split(dummy_filename) - real_file = open(real_filename + "-dummy.tmp", 'w') - real_file.write("Copied from %s\n" % real_filename) - real_file.write("Copied to %s\n" % dummy_filename) - real_file.close() + setup_tmpdir() + os.rename(real_filename, ) + os.system("%s %s -c '%s' -p '%s' 2>/dev/null" % (obexftp_prog, obexftp_args, + dirname, filename + )) + cleanup_tmpdir() def mcobex_rm(): -- 2.39.2