Skip to content

Commit

Permalink
fixed ln
Browse files Browse the repository at this point in the history
- relative symbolic link was not created in current vault directory
- avoid trying to make an empty intermediate directory
  • Loading branch information
maxpat78 committed Oct 29, 2024
1 parent 35f3aa1 commit be9b2c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pycryptomator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
COPYRIGHT = '''Copyright (C)2024, by maxpat78.'''
__version__ = '1.9'
__version__ = '1.10'
__all__ = ["Vault", "init_vault", "backupDirIds"]
from .cryptomator import *
2 changes: 1 addition & 1 deletion pycryptomator/cmshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def do_ln(p, arg):
print('use: ln <target_virtual_pathname> <symbolic_link_virtual_pathname>')
return
try:
p.vault.ln(argl[0], argl[1])
p.vault.ln(argl[0], p._prep_cd(argl[1]))
except:
print(sys.exception())

Expand Down
4 changes: 2 additions & 2 deletions pycryptomator/cryptomator.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def decryptFile(p, virtualpath, dest, force=False, move=False):
raise BaseException('destination file "%s" exists and won\'t get overwritten!'%dest)
# creates destination tree if necessary
bn = dirname(dest)
if not exists(bn):
if bn and not exists(bn):
os.makedirs(bn)
out = open(dest, 'wb')

Expand Down Expand Up @@ -397,7 +397,7 @@ def decryptDir(p, virtualpath, dest, force=False, move=False, root_dir=None):
dn = join(dest, stripr(fn, root_dir)) # target pathname
#~ dn = join(dest, fn[1:]) # target pathname
bn = dirname(dn) # target base dir
if not exists(bn):
if bn and not exists(bn):
os.makedirs(bn)
if it in files:
total_bytes += p.decryptFile(fn, dn, force, move)
Expand Down

0 comments on commit be9b2c6

Please sign in to comment.