~verterok/ubuntuone-client/fix-437471

« back to all changes in this revision

Viewing changes to ubuntuone/syncdaemon/sync.py

Locally there're no more zero size files when waiting for be filled with a download.

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
        except Exception:
222
222
            return default
223
223
 
224
 
    def make_file(self):
225
 
        "create the local empty file"
226
 
        self.fs.create_file(self.get_mdid())
227
 
 
228
224
 
229
225
def loglevel(lvl):
230
226
    """Make a function that logs at lvl log level."""
441
437
    def file_conflict(self, event, params, hash, crc32, size, stat):
442
438
        """This file is in conflict."""
443
439
        self.key.move_to_conflict()
444
 
        self.key.make_file()
445
440
 
446
441
    def local_file_conflict(self, event, params, hash):
447
442
        """This file is in conflict."""
448
443
        self.key.move_to_conflict()
449
444
        self.m.action_q.cancel_upload(share_id=self.key['share_id'],
450
445
                            node_id=self.key['node_id'])
451
 
        self.key.make_file()
452
446
        self.get_file(event, params, hash)
453
447
 
454
448
    def merge_directory(self, event, params, hash):
553
547
        self.key.set(server_hash="")
554
548
        self.key.set(local_hash="")
555
549
        self.key.sync()
556
 
        self.key.make_file()
557
550
        self.m.action_q.query([(share_id, node_id, "")])
558
551
 
559
552
    def new_file_on_server_with_local(self, event, params, share_id,