mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 21:59:16 +00:00
fix bug #233
This commit is contained in:
@@ -79,7 +79,7 @@ class Comparator:
|
|||||||
if must_ignore([os.path.join(left, i)],
|
if must_ignore([os.path.join(left, i)],
|
||||||
ignore, debug=self.debug):
|
ignore, debug=self.debug):
|
||||||
continue
|
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
|
# handle files only in dotpath dir
|
||||||
for i in comp.right_only:
|
for i in comp.right_only:
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ def cmd_compare(o, tmp):
|
|||||||
LOG.dbg('comparing {}'.format(dotfile))
|
LOG.dbg('comparing {}'.format(dotfile))
|
||||||
src = dotfile.src
|
src = dotfile.src
|
||||||
if not os.path.lexists(os.path.expanduser(dotfile.dst)):
|
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))
|
LOG.log(line.format(dotfile.key, dotfile.dst))
|
||||||
same = False
|
same = False
|
||||||
continue
|
continue
|
||||||
@@ -421,7 +421,7 @@ def cmd_importer(o):
|
|||||||
LOG.err('importing \"{}\" failed!'.format(path))
|
LOG.err('importing \"{}\" failed!'.format(path))
|
||||||
ret = False
|
ret = False
|
||||||
continue
|
continue
|
||||||
cmd = ['cp', '-R', '-L', dst, srcf]
|
cmd = ['cp', '-R', '-L', '-T', dst, srcf]
|
||||||
if o.dry:
|
if o.dry:
|
||||||
LOG.dry('would run: {}'.format(' '.join(cmd)))
|
LOG.dry('would run: {}'.format(' '.join(cmd)))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -90,6 +90,16 @@ nb=`cat ${cfg} | grep d_adir | wc -l`
|
|||||||
nb=`cat ${cfg} | grep f_file3 | wc -l`
|
nb=`cat ${cfg} | grep f_file3 | wc -l`
|
||||||
[ "${nb}" != "2" ] && echo 'bad config2' && exit 1
|
[ "${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
|
## CLEANING
|
||||||
rm -rf ${tmps} ${tmpd}
|
rm -rf ${tmps} ${tmpd}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user