From 31e62bd19e2fcfe70487ab38ee6b688e48a79c95 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 20 Aug 2017 21:24:58 -0700 Subject: a few file activities were not getting synced --- util/dcp | 9 +++++++-- util/dmkdir | 9 +++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/dcp b/util/dcp index 86c25259f..14ff5d5d3 100755 --- a/util/dcp +++ b/util/dcp @@ -54,10 +54,12 @@ if($argc != 3) { $folder = $x['data']['hash']; } + $hash = random_string(); + $arr = [ 'src' => $srcfile, 'filename' => basename($srcfile), - 'hash' => random_string(), + 'hash' => $hash, 'allow_cid' => $channel['channel_allow_cid'], 'allow_gid' => $channel['channel_allow_gid'], 'deny_cid' => $channel['channel_deny_cid'], @@ -70,4 +72,7 @@ if($argc != 3) { attach_store($channel,$channel['channel_hash'],'import',$arr); - + $sync = attach_export_data($channel,$hash); + if($sync) + build_sync_packet($channel['channel_id'],array('file' => array($sync))); + diff --git a/util/dmkdir b/util/dmkdir index ffb1932e5..72ab22431 100755 --- a/util/dmkdir +++ b/util/dmkdir @@ -46,3 +46,12 @@ if($argc != 2) { ]; $x = attach_mkdirp($channel,$channel['channel_hash'],$arr); + + if($x['success']) { + $hash = $x['data']['hash']; + + $sync = attach_export_data($channel,$hash); + if($sync) { + build_sync_packet($channel['channel_id'],array('file' => array($sync))); + } + } \ No newline at end of file -- cgit v1.2.3