Skip to content

Commit 4840684

Browse files
committed
qtplasmac: change updater to only unlink qtplasmac symlink
Previously we deleted the (empty) qtplasmac folder if it existed as well. Due to how qtvcp copy works, the folder needs to exist, and an empty one (from an old config) really doesnt matter. This fixes the issue described by Samas322 in this thread: https://forum.linuxcnc.org/plasmac/49311-qtvcp-copy-error#273305
1 parent 67b8140 commit 4840684

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,16 +2378,13 @@ def update_check(self):
23782378
if 'metric_startup' in startupCode or 'imperial_startup' in startupCode:
23792379
self.updateIni.append(207)
23802380
# remove the qtplasmac link from the config directory (pre V1.225.208 2022/06/29)
2381-
if os.path.lexists(os.path.join(self.PATHS.CONFIGPATH, 'qtplasmac')):
2381+
if os.path.islink(os.path.join(self.PATHS.CONFIGPATH, 'qtplasmac')):
23822382
# stage 1: set up for unlinking on the next run of qtplasmac
23832383
if 'code.py' in self.iniFile.find('FILTER', 'ngc'):
23842384
self.updateIni.append(208)
23852385
# stage 2: remove the qtplasmac link
23862386
else:
2387-
if os.path.islink(os.path.join(self.PATHS.CONFIGPATH, 'qtplasmac')):
2388-
os.unlink(os.path.join(self.PATHS.CONFIGPATH, 'qtplasmac'))
2389-
else:
2390-
os.rmdir(os.path.join(self.PATHS.CONFIGPATH, 'qtplasmac'))
2387+
os.unlink(os.path.join(self.PATHS.CONFIGPATH, 'qtplasmac'))
23912388
# move qtplasmac options from INI file to prefs file pre V1.227.219 2022/07/14)
23922389
if not self.PREFS.has_section('BUTTONS'):
23932390
UPDATER.move_options_to_prefs_file(self.iniFile, self.PREFS)

0 commit comments

Comments
 (0)