comparison roundup/hyperdb.py @ 2963:d29673626906 maint-0.7

fix some introduced import bugs
author Richard Jones <richard@users.sourceforge.net>
date Thu, 25 Nov 2004 22:56:14 +0000
parents 0d8b3b5f40ea
children
comparison
equal deleted inserted replaced
2960:409510fcb18f 2963:d29673626906
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: hyperdb.py,v 1.97.2.5 2004-10-08 00:57:22 richard Exp $ 18 # $Id: hyperdb.py,v 1.97.2.6 2004-11-25 22:56:14 richard Exp $
19 19
20 """Hyperdatabase implementation, especially field types. 20 """Hyperdatabase implementation, especially field types.
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
785 shutil.copyfile(source, dest) 785 shutil.copyfile(source, dest)
786 786
787 def import_files(self, dirname, nodeid): 787 def import_files(self, dirname, nodeid):
788 ''' Import the "content" property as a file 788 ''' Import the "content" property as a file
789 ''' 789 '''
790 dest = self.db.filename(self.classname, nodeid) 790 dest = self.db.filename(self.classname, nodeid, create=1)
791 x, filename = os.path.split(dest) 791 x, filename = os.path.split(dest)
792 x, subdir = os.path.split(x) 792 x, subdir = os.path.split(x)
793 source = os.path.join(dirname, self.classname+'-files', subdir, 793 source = os.path.join(dirname, self.classname+'-files', subdir,
794 filename) 794 filename)
795 if not os.path.exists(os.path.dirname(dest)): 795 if not os.path.exists(os.path.dirname(dest)):

Roundup Issue Tracker: http://roundup-tracker.org/