Bug 8557 - Comments in a folder are not deleted from configuration
Summary: Comments in a folder are not deleted from configuration
Status: RESOLVED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.19.0
Assignee: Samuel Mannehed
URL:
Keywords: aleze_tester, prosaic
Depends on:
Blocks:
 
Reported: 2025-03-27 11:30 CET by Samuel Mannehed
Modified: 2025-04-01 16:47 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:
MUST * Comments within a folder must be deleted when the folder is deleted * Empty lines within a folder must be deleted when the folder is deleted SHOULD * Comments directly above another folder should not be removed


Attachments

Description Samuel Mannehed cendio 2025-03-27 11:30:12 CET
Comments (or empty lines) under a folder in a .hconf file are not removed when the folder is removed.

If there, for example, is a number of profiles in the configuration like this:

> [/profiles/xfce]
> ...
> 
> [/profiles/cinnamon]
> 
> xdg_session=cinnamon
> 
> # I removed the translations
> name=Cinnamon desktop
> 
> #
> # I changed the default description
> #
> description=My own description
> icon=cinnamon.svg
> screenshot=cinnamon-ss.png
> cmdline=
> testcmd=
> description_from_testcmd=false
> 
> [/profiles/mate]
> ...
And the profile "cinnamon" then is deleted using Web Admin, the configuration looks like this afterwards:
> [/profiles/xfce]
> ...
> 
> 
> # I removed the translations
> 
> #
> # I changed the default description
> #
> 
> [/profiles/mate]
> ...
Comment 2 Samuel Mannehed cendio 2025-03-31 10:24:06 CEST
Fixed now. Tested on Fedora 41. After the changes, using the same test-folder structure as in comment #0, the end result is:
> [/profiles/xfce]
> ...
> 
> [/profiles/mate]
> ...

Looking at the AC:
> MUST
> 
> * Comments within a folder must be deleted when the folder is deleted
Yep.
> * Empty lines within a folder must be deleted when the folder is deleted
Yep
> SHOULD
> 
> * Comments directly above another folder should not be removed
No, this was not implemented. All comments will be removed until we reach the next section (folder-marker).
Comment 4 Samuel Mannehed cendio 2025-03-31 16:32:05 CEST
As noticed by Alex in bug 8558, comments in hiveconf can start with ";" as well. Such comments are now also removed upon a folder deletion.

Note You need to log in before you can comment on or make changes to this bug.