summaryrefslogtreecommitdiffstats
path: root/src/state.c
AgeCommit message (Collapse)AuthorFilesLines
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
2020-01-18Only remove files in state bundle when deleting stateDavid Robillard1-6/+8
2020-01-18Factor out writing state manifestDavid Robillard1-10/+25
2020-01-18Ensure state directory path always ends in a separatorDavid Robillard1-8/+13
This can cause problems when resolving relative paths against the bundle directory, and it's simpler to ensure that the path always ends in a separator than deal with both cases in every place it is used.
2020-01-18Remove redundant LILV_API declarationsDavid Robillard1-17/+17
There are specified in the declarations in the public API header, there is no need to duplicate them in the definitions.
2019-12-08Implement state:freePath featureDavid Robillard1-8/+31
2019-06-21Refuse to store state properties with null keysDavid Robillard1-0/+4
2019-06-21Refuse to store duplicate properties when saving plugin stateDavid Robillard1-0/+5
2019-06-21Factor out state property searchingDavid Robillard1-5/+13