mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:09:44 +00:00
fix bug #233
This commit is contained in:
@@ -79,7 +79,7 @@ class Comparator:
|
||||
if must_ignore([os.path.join(left, i)],
|
||||
ignore, debug=self.debug):
|
||||
continue
|
||||
ret.append('=> \"{}\" does not exist on local\n'.format(i))
|
||||
ret.append('=> \"{}\" does not exist on destination\n'.format(i))
|
||||
|
||||
# handle files only in dotpath dir
|
||||
for i in comp.right_only:
|
||||
|
||||
@@ -227,7 +227,7 @@ def cmd_compare(o, tmp):
|
||||
LOG.dbg('comparing {}'.format(dotfile))
|
||||
src = dotfile.src
|
||||
if not os.path.lexists(os.path.expanduser(dotfile.dst)):
|
||||
line = '=> compare {}: \"{}\" does not exist on local'
|
||||
line = '=> compare {}: \"{}\" does not exist on destination'
|
||||
LOG.log(line.format(dotfile.key, dotfile.dst))
|
||||
same = False
|
||||
continue
|
||||
@@ -421,7 +421,7 @@ def cmd_importer(o):
|
||||
LOG.err('importing \"{}\" failed!'.format(path))
|
||||
ret = False
|
||||
continue
|
||||
cmd = ['cp', '-R', '-L', dst, srcf]
|
||||
cmd = ['cp', '-R', '-L', '-T', dst, srcf]
|
||||
if o.dry:
|
||||
LOG.dry('would run: {}'.format(' '.join(cmd)))
|
||||
else:
|
||||
|
||||
@@ -90,6 +90,16 @@ nb=`cat ${cfg} | grep d_adir | wc -l`
|
||||
nb=`cat ${cfg} | grep f_file3 | wc -l`
|
||||
[ "${nb}" != "2" ] && echo 'bad config2' && exit 1
|
||||
|
||||
cntpre=`find ${tmps}/dotfiles -type f | wc -l`
|
||||
|
||||
# reimport
|
||||
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 -V ${tmpd}/adir
|
||||
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 -V ${tmpd}/file3
|
||||
|
||||
cntpost=`find ${tmps}/dotfiles -type f | wc -l`
|
||||
|
||||
[ "${cntpost}" != "${cntpre}" ] && echo "import issue" && exit 1
|
||||
|
||||
## CLEANING
|
||||
rm -rf ${tmps} ${tmpd}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user