~rye/ubuntuone-client/unique-check-is-unique

« back to all changes in this revision

Viewing changes to ubuntuone/syncdaemon/sync.py

  • Committer: Tarmac
  • Author(s): facundo at com
  • Date: 2010-09-13 20:36:05 UTC
  • mfrom: (687.1.1 auto-conflict)
  • Revision ID: tarmac-20100913203605-74vkvw2pnml0x8oq
Don't generate a new file if we're deleting or overwriting it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1098
1098
                    continue
1099
1099
 
1100
1100
                # here we must call handlers for SV_HASH_NEW, SV_MOVED
1101
 
 
1102
1101
                try:
1103
1102
                    node = self.m.fs.get_by_node_id(dt.share_id, dt.node_id)
1104
1103
                except KeyError:
 
1104
                    # if we're deleting this node right now, just ignore it
 
1105
                    # from the received delta
 
1106
                    if self.m.fs.node_in_trash(dt.share_id, dt.node_id):
 
1107
                        continue
 
1108
 
1105
1109
                    # node not there, we must create it
1106
1110
                    if is_dir:
1107
1111
                        self._handle_SV_DIR_NEW(dt.share_id, dt.node_id,
1108
 
                                               dt.parent_id, dt_name)
 
1112
                                                dt.parent_id, dt_name)
1109
1113
                    else:
1110
1114
                        self._handle_SV_FILE_NEW(dt.share_id, dt.node_id,
1111
 
                                               dt.parent_id, dt_name)
 
1115
                                                 dt.parent_id, dt_name)
1112
1116
                    node = self.m.fs.get_by_node_id(dt.share_id, dt.node_id)
1113
1117
 
1114
1118
                # if the delta is older than the node, skip!