1
0
Fork 0

GUI: Fix the profile deleter script

Instead of hardcoding a path, use 
`tuned.consts.USER_PROFILES_DIR` as the location
where we should expect to find profile directories
that we've been asked to delete.
This commit is contained in:
Frank Dana 2025-03-07 18:32:15 -05:00 committed by GitHub
parent 889387b000
commit c82101f03a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,12 @@ import os
import sys
import shutil
import tuned.consts
if __name__ == '__main__':
shutil.rmtree('/etc/tuned/%s' % (os.path.basename(os.path.abspath(sys.argv[1]))))
shutil.rmtree(
os.path.join(
tuned.consts.USER_PROFILES_DIR,
os.path.basename(os.path.abspath(sys.argv[1]))
))