Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
/yumex-dnf-oldPublic archive

Commitc305710

Browse files
make sure autostart user folder exists before attempting to copy files to it
On my KDE installation the ~/.config/autostart/ folder did not exist, which led to myself (and other KDE users on my distro) hitting this bug:$ yumex-dnfTraceback (most recent call last): File "/usr/lib/python3.10/site-packages/yumex/__init__.py", line 55, in on_activate self.window = Window( File "/usr/lib/python3.10/site-packages/yumex/gui/window/__init__.py", line 64, in __init__ self.legacy_cleanup() File "/usr/lib/python3.10/site-packages/yumex/gui/window/__init__.py", line 110, in legacy_cleanup shutil.copy(const.SYS_DESKTOP_FILE, const.USER_DESKTOP_FILE) File "/usr/lib64/python3.10/shutil.py", line 417, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib64/python3.10/shutil.py", line 256, in copyfile with open(dst, 'wb') as fdst:FileNotFoundError: [Errno 2] No such file or directory: '/home/tcrider/.config/autostart/yumex-dnf-updater.desktop'This patch makes sure ~/.config/autostart folder exists before attempting to copy the yumex-dnf-updater.desktop file to it, and if not creates it.
1 parentd62f276 commitc305710

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/yumex/gui/window/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def legacy_cleanup(self):
106106
os.unlink(const.LEGACY_DESKTOP_FILE)
107107
ifCONFIG.conf.autostart:
108108
ifnotos.path.exists(const.USER_DESKTOP_FILE):
109+
ifnotos.path.exists(const.AUTOSTART_DIR):
110+
os.mkdir(const.AUTOSTART_DIR)
109111
logger.debug(f"create autostart:{const.USER_DESKTOP_FILE}")
110112
shutil.copy(const.SYS_DESKTOP_FILE,const.USER_DESKTOP_FILE)
111113
# key is renamed to keyword

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp