X-Git-Url: https://git.phdru.name/?p=extfs.d.git;a=blobdiff_plain;f=dummy;h=43a7e697aa426054f9d2a51c67ea37d94f94f0cc;hp=5e580b516787f431158ba05c089f780498aa1927;hb=f988468cf61fa5f048b4fe281602521271b3293b;hpb=60982ee2bb974241f897602a70ae21f277982f66 diff --git a/dummy b/dummy index 5e580b5..43a7e69 100755 --- a/dummy +++ b/dummy @@ -1,19 +1,10 @@ -#! /usr/local/bin/python -O +#! /usr/bin/env python +"""Dummy VFS for Midnight Commander. Just for a test.""" -""" -Dummy VFS for Midnight Commander. Just for a test. - -Author: Oleg BroytMann . -Copyright (C) 2004 PhiloSoft Design. -License: GPL. - -""" - -__version__ = "1.0.0" -__revision__ = "$Id: dummy,v 1.7 2004/06/13 13:26:57 phd Exp $" -__date__ = "$Date: 2004/06/13 13:26:57 $"[7:-2] -__author__ = "Oleg Broytmann " -__copyright__ = "Copyright (C) 2004 PhiloSoft Design" +__version__ = "1.0.3" +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2004-2013 PhiloSoft Design" +__license__ = "GPL" import sys @@ -29,7 +20,7 @@ def error(msg): if len(sys.argv) < 2: error("""\ It is not a program - it is a dummy VFS for Midnight Commander. -Put it in /usr/lib/mc/extfs.""") +Put it in $HOME/.mc/extfs.d or /usr/lib/mc/extfs.""") def mcdummy_list(): @@ -49,9 +40,9 @@ def mcdummy_copyout(): dummy_filename = sys.argv[3] real_filename = sys.argv[4] - real_file = open(real_filename, 'w') - real_file.write("Copied from %s\n" % dummy_filename) - real_file.write("Copied to %s\n" % real_filename) + real_file = open(real_filename, 'a') + real_file.write("Copy from %s\n" % dummy_filename) + real_file.write("Copy to %s\n" % real_filename) real_file.close() @@ -61,9 +52,9 @@ def mcdummy_copyin(): dummy_filename = sys.argv[3] real_filename = sys.argv[4] - 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 = open(real_filename + "-dummy.tmp", 'a') + real_file.write("Copy from %s\n" % real_filename) + real_file.write("Copy to %s\n" % dummy_filename) real_file.close()