mirror of https://github.com/borgbase/vorta
Move socket file from state-dir to tmp-dir. Fixes #513
This commit is contained in:
parent
30245cb451
commit
96e4d4bef2
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue