Move socket file from state-dir to tmp-dir. Fixes #513

This commit is contained in:
Hofer Julian 2020-06-22 10:24:38 +02:00 committed by GitHub
parent 30245cb451
commit 96e4d4bef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -6,7 +6,7 @@ from PyQt5.QtWidgets import QMessageBox
from vorta.borg.create import BorgCreateThread
from vorta.borg.version import BorgVersionThread
from vorta.config import STATE_DIR
from vorta.config import TEMP_DIR
from vorta.i18n import init_translations, translate
from vorta.models import BackupProfileModel, SettingsModel
from vorta.qt_single_application import QtSingleApplication
@ -16,7 +16,7 @@ from vorta.utils import borg_compat, parse_args
from vorta.views.main_window import MainWindow
from vorta.notifications import VortaNotifications
APP_ID = os.path.join(STATE_DIR, "socket")
APP_ID = os.path.join(TEMP_DIR, "socket")
class VortaApp(QtSingleApplication):

View File

@ -7,7 +7,8 @@ APP_ID_DARWIN = 'com.borgbase.client.macos'
dirs = appdirs.AppDirs(APP_NAME, APP_AUTHOR)
SETTINGS_DIR = dirs.user_data_dir
LOG_DIR = dirs.user_log_dir
STATE_DIR = dirs.user_state_dir
CACHE_DIR = dirs.user_cache_dir
TEMP_DIR = os.path.join(CACHE_DIR, "tmp")
if not os.path.exists(SETTINGS_DIR):
os.makedirs(SETTINGS_DIR)
@ -15,5 +16,8 @@ if not os.path.exists(SETTINGS_DIR):
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
if not os.path.exists(STATE_DIR):
os.makedirs(STATE_DIR)
if not os.path.exists(CACHE_DIR):
os.makedirs(CACHE_DIR)
if not os.path.exists(TEMP_DIR):
os.makedirs(TEMP_DIR)