mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #416 from YunoHost/fix-1044-symlink-archives-dir
[fix] Broken symlink to the archives dir
This commit is contained in:
commit
af21d5ab0d
2 changed files with 6 additions and 0 deletions
|
@ -101,6 +101,7 @@
|
|||
"backup_output_directory_forbidden": "Forbidden output directory. Backups can't be created in /bin, /boot, /dev, /etc, /lib, /root, /run, /sbin, /sys, /usr, /var or /home/yunohost.backup/archives sub-folders",
|
||||
"backup_output_directory_not_empty": "The output directory is not empty",
|
||||
"backup_output_directory_required": "You must provide an output directory for the backup",
|
||||
"backup_output_symlink_dir_broken": "You have a broken symlink instead of your archives directory '{path:s}'. You may have a specific setup to backup your data on an other filesystem, in this case you probably forgot to remount or plug your hard dirve or usb key.",
|
||||
"backup_running_app_script": "Running backup script of app '{app:s}'...",
|
||||
"backup_running_hooks": "Running backup hooks...",
|
||||
"backup_system_part_failed": "Unable to backup the '{part:s}' system part",
|
||||
|
|
|
@ -2301,6 +2301,11 @@ def backup_delete(name):
|
|||
def _create_archive_dir():
|
||||
""" Create the YunoHost archives directory if doesn't exist """
|
||||
if not os.path.isdir(ARCHIVES_PATH):
|
||||
if os.path.lexists(ARCHIVES_PATH):
|
||||
raise MoulinetteError(errno.EINVAL,
|
||||
m18n.n('backup_output_symlink_dir_broken',
|
||||
path=ARCHIVES_PATH))
|
||||
|
||||
os.mkdir(ARCHIVES_PATH, 0750)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue