~jameinel/bzr/fix-push2

« back to all changes in this revision

Viewing changes to bzrlib/export/zip_exporter.py

  • Committer: Aaron Bentley
  • Date: 2006-09-22 04:52:17 UTC
  • mfrom: (2029 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2078.
  • Revision ID: aaron.bentley@utoronto.ca-20060922045217-4e775bf2fc6d0b3b
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
            file_id = ie.file_id
50
50
            mutter("  export {%s} kind %s to %s", file_id, ie.kind, dest)
51
51
 
 
52
            filename = os.path.join(root, dp).encode('utf8')
52
53
            if ie.kind == "file": 
53
54
                zinfo = zipfile.ZipInfo(
54
 
                            filename=str(os.path.join(root, dp)),
 
55
                            filename=filename,
55
56
                            date_time=now)
56
57
                zinfo.compress_type = compression
57
58
                zipf.writestr(zinfo, tree.get_file_text(file_id))
58
59
            elif ie.kind == "directory":
59
60
                zinfo = zipfile.ZipInfo(
60
 
                            filename=str(os.path.join(root, dp)+os.sep),
 
61
                            filename=filename,
61
62
                            date_time=now)
62
63
                zinfo.compress_type = compression
63
64
                zipf.writestr(zinfo,'')
64
65
            elif ie.kind == "symlink":
65
66
                zinfo = zipfile.ZipInfo(
66
 
                            filename=str(os.path.join(root, dp+".lnk")),
 
67
                            filename=(filename + '.lnk'),
67
68
                            date_time=now)
68
69
                zinfo.compress_type = compression
69
70
                zipf.writestr(zinfo, ie.symlink_target)