/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/walker/copy_base.py

  • Committer: Tim Marston
  • Date: 2016-02-28 17:51:41 UTC
  • Revision ID: tim@ed.am-20160228175141-paziccmndn03e3s8
don't attempt to add parent directories whena adding a file

Show diffs side-by-side

added added

removed removed

21
21
 
22
22
import filecmp, os, shutil
23
23
from walker import Walker
24
 
from stdhome import the
25
 
from stdhome import util
 
24
import stdhome.the as the
26
25
 
27
26
 
28
27
class CopyBaseWalker( Walker ):
62
61
                        # if dst entity is a directory, copy permissions, as required (and
63
62
                        # recurse)
64
63
                        elif dst.type == 'd':
65
 
                                if os.stat( src.file ).st_mode != os.stat( dst.file ).st_mode:
66
 
                                        self.print_op( rel_file, 'd', '*', 'd' )
67
 
                                        shutil.copystat( src.file, dst.file )
68
 
                                else:
69
 
                                        self.print_op( rel_file, 'd', '=', 'd' )
 
64
                                # TODO: should check permission and only do as necessary
 
65
                                self.print_op( rel_file, 'd', '*', 'd' )
 
66
                                shutil.copystat( src.file, dst.file )
70
67
                                return True
71
68
 
72
69
                        # if dst entity is a symlink to a directory, and this is an