mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-30 05:46:31 -04:00
In compliance with the XDG base directory spec, entries are now stored in ~/.local/share/sshyp/
Former-commit-id: fbb98f890b417395345a7a71ad158e48fa36a7ef [formerly 0c1f34bc30]
Former-commit-id: 91bd7170c0c56c093cf2126ce089be0e8255d6ce
This commit is contained in:
+3
-3
@@ -12,12 +12,12 @@ from shutil import rmtree
|
||||
def delete(_file_path):
|
||||
if _file_path.endswith('/'):
|
||||
try:
|
||||
rmtree(f"{expanduser('~/.password-pasture/')}{_file_path}")
|
||||
rmtree(f"{expanduser('~/.local/share/sshyp/')}{_file_path}")
|
||||
except FileNotFoundError:
|
||||
print('folder does not exist remotely')
|
||||
else:
|
||||
try:
|
||||
remove(f"{expanduser('~/.password-pasture/')}{_file_path}.gpg")
|
||||
remove(f"{expanduser('~/.local/share/sshyp/')}{_file_path}.gpg")
|
||||
except FileNotFoundError:
|
||||
print('file does not exist remotely')
|
||||
for _device_name in listdir(expanduser('~/.config/sshyp/devices')):
|
||||
@@ -39,7 +39,7 @@ def deletion_check(_client_device_name):
|
||||
|
||||
def folder_check():
|
||||
open(expanduser('~/.config/sshyp/folder_database'), 'w').write('')
|
||||
for _root, _directories, _files in walk(expanduser('~/.password-pasture')):
|
||||
for _root, _directories, _files in walk(expanduser('~/.local/share/sshyp')):
|
||||
for _dir in _directories:
|
||||
open(expanduser('~/.config/sshyp/folder_database'), 'a')\
|
||||
.write(f"{_root.replace(expanduser('~'), '')}/{_dir}\n")
|
||||
|
||||
Reference in New Issue
Block a user