Exemple #1
0
    def handle_add_nondir(self, path, a, recursing):
	update_link(a[2], path, a[1])
	if a[2]['kind'] == 'file':
	    try:
		a[2]['md5'] = hashing.hashof(os.path.join(path, a[1]))
	    except OSError:
		a[2]['md5'] = '[error]'
	yield a
	return
Exemple #2
0
    def handle_same_nondir(self, path, a, b):
	update_link(b[2], path, b[1])
	if b[2]['kind'] == 'file':
	    if same_inode(a[2], b[2]):
		b[2]['md5'] = a[2]['md5']
	    else:
		try:
		    b[2]['md5'] = hashing.hashof(os.path.join(path, b[1]))
		except OSError:
		    b[2]['md5'] = '[error]'
	yield b
	return