1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 16:49:42 +00:00

Invert link with --link flag (#80)

This commit is contained in:
Marcel Robitaille
2019-01-26 20:25:08 -04:00
parent 63e2164b6a
commit f8802ea1ac

View File

@@ -263,11 +263,16 @@ def cmd_importer(opts, conf, paths):
dotfile = Dotfile('', dst, src)
linktype = LinkTypes.NOLINK
if opts['link'] or opts['link_by_default']:
if opts['link_by_default']:
linktype = LinkTypes.PARENTS
elif opts['link_children']:
linktype = LinkTypes.CHILDREN
if opts['link'] and linktype == LinkTypes.PARENTS:
linktype = LinkTypes.NOLINK
else:
linktype = LinkTypes.PARENTS
if opts['debug']:
LOG.dbg('new dotfile: {}'.format(dotfile))