ignore .swp files when creating file_list, bumped version

This commit is contained in:
Marcus Stoegbauer 2024-04-01 11:08:48 +02:00
parent f28e231185
commit 1f12b78ef3
2 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "userconfig" name = "userconfig"
version = "2.0" version = "2.0-1"
authors = [ {name = "Marcus Stoegbauer", email = "marcus@grmpf.org"} ] authors = [ {name = "Marcus Stoegbauer", email = "marcus@grmpf.org"} ]
maintainers = [ {name = "Marcus Stoegbauer", email = "marcus@grmpf.org"} ] maintainers = [ {name = "Marcus Stoegbauer", email = "marcus@grmpf.org"} ]
description = "Generate config files for user home" description = "Generate config files for user home"

View File

@ -91,6 +91,9 @@ class Userconfig:
(prio, category, value, category_dir) = category_dir_tuple (prio, category, value, category_dir) = category_dir_tuple
self._cfg.debug.stdout(f'process category {category_dir}', 3) self._cfg.debug.stdout(f'process category {category_dir}', 3)
for file in os.scandir(category_dir): for file in os.scandir(category_dir):
if file.name.endswith('.swp'):
self._cfg.debug.stdout(f'Ignoring swap file {file.name}', 3)
continue
if file.name not in file_list: if file.name not in file_list:
file_list[file.name] = [] file_list[file.name] = []
file_list[file.name].append(file.path) file_list[file.name].append(file.path)