summaryrefslogtreecommitdiffstats
path: root/src/state.c
AgeCommit message (Collapse)AuthorFilesLines
2024-11-24Use angle brackets for library includes and clean up include pathsDavid Robillard1-17/+16
2024-10-11Add missing const qualifiersDavid Robillard1-21/+21
2024-09-28Fix whitespaceDavid Robillard1-1/+1
2024-06-10Fix parent path in lilv_state_new_from_file()rncbc1-3/+4
See also: https://www.rncbc.org/drupal/comment/10648#comment-10648 https://tracker.ardour.org/view.php?id=9717
2024-01-20Avoid overriding state features passed by the hostrncbc1-0/+9
2024-01-09Fix potential null dereferences and conversion warningsDavid Robillard1-13/+19
A few of these can't actually happen, but that's opaque to static analysis, so appease clang-tidy with casts since the checks are too valuable to suppress.
2024-01-09Fix null dereference when trying to load state from a missing fileDavid Robillard1-5/+9
2023-09-23Fix crash when plugins pass NULL to the LV2_State_Retrieve_FunctionDavid Robillard1-3/+9
2022-12-10Avoid "suspicious" string comparisonsDavid Robillard1-5/+6
2022-11-16Fix potential crash when writing state files failsDavid Robillard1-7/+7
2022-11-16Remove filesystem moduleDavid Robillard1-5/+15
2022-11-16Use zix_path_parent_path()David Robillard1-5/+6
2022-11-16Use zix_path_filename()David Robillard1-4/+2
2022-11-16Use zix_path_lexically_relative()David Robillard1-3/+3
2022-11-16Use zix_create_symlink()David Robillard1-11/+25
2022-11-16Use zix_path_is_absolute()David Robillard1-2/+2
2022-11-16Use zix_file_lock()David Robillard1-2/+2
2022-11-16Use zix_copy_file()David Robillard1-4/+4
2022-11-16Use zix_create_directories()David Robillard1-7/+10
2022-11-16Use zix_remove()David Robillard1-2/+2
2022-11-16Use zix_file_equals()David Robillard1-3/+4
2022-11-16Use zix_canonical_path()David Robillard1-34/+42
2022-11-16Use zix_path_join()David Robillard1-20/+23
2022-11-16Use zix_file_type() and zix_symlink_type()David Robillard1-7/+8
2022-11-16Switch to external zix dependencyDavid Robillard1-3/+4
2022-09-01Adopt REUSE machine-readable licensing standardDavid Robillard1-15/+2
2021-01-11Fix unused parameter warningsDavid Robillard1-0/+12
2021-01-11Update zixDavid Robillard1-2/+2
2021-01-02Use email address instead of website for attributionDavid Robillard1-1/+1
2020-12-31Format all code with clang-formatDavid Robillard1-1115/+1116
2020-12-31Avoid "else" after "return"David Robillard1-4/+12
2020-12-18Windows: Fix saving state with filesDavid Robillard1-10/+20
2020-12-18Windows: Fix determining state filenames from backslashey pathsDavid Robillard1-2/+3
2020-12-18Windows: Fix updating state manifestsDavid Robillard1-12/+9
This didn't work because the mode was wrong (serd uses binary because it is always UTF-8), and... other reasons I don't understand. Regarless this is more consistent without files are read elsewhere.
2020-12-17Fix writing state manifests on WindowsDavid Robillard1-12/+32
2020-12-16Fix potential null dereferenceDavid Robillard1-1/+3
2020-12-01Use the canonical path for state directoriesDavid Robillard1-7/+8
This fixes an issue on MacOS if hosts use a temporary directory generated with mkdtemp, which can create paths that involve symlinks. This is problematic since the parent directory comparisons here need to determine if a file is really in one of the state directories. The actual paths here shouldn't be visible in saved state, so resolve them fully so that the directory membership tests work correctly and copies and/or links are created when necessary.
2020-11-11Fix typesDavid Robillard1-2/+2
Oof. How this got past me is anyone's guess.
2020-11-11Fix unlikely undefined behavior when saving stateDavid Robillard1-2/+17
2020-08-06Add lilv_remove()David Robillard1-6/+2
2020-08-06Add block parameter to lilv_flockDavid Robillard1-2/+2
2020-08-06Remove lilv_dir_path()David Robillard1-3/+3
This function was weird. Instead, to make a directory path with trailing separator, join nothing as in Python.
2020-08-06Rename some filename utilities for clarityDavid Robillard1-7/+7
Loosely inspired by Python and the std::filesystem API.
2020-08-06Separate filesystem utilitiesDavid Robillard1-7/+31
2020-07-16Add missing variable initializationsDavid Robillard1-1/+2
2020-07-16Clean up includesDavid Robillard1-0/+4
2020-01-18Update manifest when deleting state from a non-empty bundleDavid Robillard1-1/+6
This fixes a bug where the manifest would contain dangling references to old state if multiple states were saved to a single bundle and one is deleted. As far as I know this has not been encountered by anyone in reality, since this is an uncommon scenario (it's somewhat in question whether it should be supported at all).
2020-01-18Support deleting state that has not been savedDavid Robillard1-16/+21
This makes it possible to delete state bundles created from an instance, where the plugin has added some files to the bundle, but the state has not yet been saved by the host so there is no manifest and/or state file.
2020-01-18Clean up path code in lilv_state_delete()David Robillard1-6/+5
2020-01-18Fix deleting state bundles loaded from the modelDavid Robillard1-7/+18