[improvement] the temp dir used now has a different name if you launch bauh as the root user to avoid permissioning issues

This commit is contained in:
Vinícius Moreira
2020-02-12 14:41:30 -03:00
parent 9d373adfcc
commit 584064f214
7 changed files with 14 additions and 11 deletions

View File

@@ -16,6 +16,7 @@ from bauh.api.abstract.view import MessageType
from bauh.api.http import HttpClient
from bauh.commons import user
from bauh.commons.html import bold
from bauh.gems.web import TEMP_PATH
from bauh.view.qt import dialog, commons, qt_utils, root
from bauh.view.qt.about import AboutDialog
from bauh.view.qt.apps_table import AppsTable, UpdateToggleButton
@@ -1113,7 +1114,7 @@ class ManageWindow(QWidget):
console_output = self.textarea_output.toPlainText()
if console_output:
log_path = '/tmp/bauh/logs/install/{}/{}'.format(res['pkg'].model.get_type(), res['pkg'].model.name)
log_path = '{}/logs/install/{}/{}'.format(TEMP_PATH, res['pkg'].model.get_type(), res['pkg'].model.name)
try:
Path(log_path).mkdir(parents=True, exist_ok=True)