summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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-18Windows: Prefer backslash as a path separatorDavid Robillard1-1/+24
This situation is, as always, a total nightmare. In an attempt to not make weird paths with mixed separators, a heuristic is used here which uses forward slash if it seems that the input paths do. Otherwise, backslash (the "preferred" separator on Windows despite all good sense) is used.
2020-12-18Windows: Don't bother trying to create symbolic linksDavid Robillard1-6/+1
This only works on modern systems with "Developer Mode" enabled, so everything needs to work without them in reality anyway.
2020-12-18Windows: Fix leaking directory handlesDavid Robillard1-0/+1
2020-12-18Add lilv_path_absolute_child()David Robillard2-0/+19
2020-12-18Add lilv_path_filename()David Robillard2-0/+30
2020-12-18Fix build with ancient GCCDavid Robillard1-2/+2
2020-12-17Fix writing state manifests on WindowsDavid Robillard1-12/+32
2020-12-16Fix potential null dereferenceDavid Robillard1-1/+3
2020-12-16Clean up includesDavid Robillard1-9/+6
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-17Suppress internal deprecation warnings about serd_uri_to_path()David Robillard1-0/+9
This function is deprecated, but is only used here in the implementation of lilv_uri_to_path() which is also deprecated (for the same reason), so application code will still get the warning.
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-11-11Fix potential memory error when joining filesystem pathsDavid Robillard1-4/+5
2020-08-07Fix error handling when copying filesDavid Robillard1-0/+4
2020-08-06Implement file locking on WindowsDavid Robillard1-1/+14
2020-08-06Add lilv_remove()David Robillard4-8/+18
2020-08-06Fix lilv_create_directories() error handling when path is a fileDavid Robillard1-1/+2
2020-08-06Make lilv_dir_for_each() ignore dot entriesDavid Robillard2-9/+9
2020-08-06Add lilv_create_temporary_directory()David Robillard2-0/+51
2020-08-06Add lilv_is_directory()David Robillard2-0/+12
2020-08-06Add lilv_path_current()David Robillard2-0/+10
2020-08-06Add lilv_temp_directory_path()David Robillard2-0/+23
2020-08-06Add block parameter to lilv_flockDavid Robillard3-7/+12
2020-08-06Remove lilv_dir_path()David Robillard3-27/+4
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 Robillard4-16/+16
Loosely inspired by Python and the std::filesystem API.
2020-08-06Separate filesystem utilitiesDavid Robillard8-410/+568
2020-07-17Fix potential NULL dereference warningDavid Robillard1-3/+9
Not really something that matters in these cases since allocation failure is not handled gracefully anyway.
2020-07-16Fix potential va_list leakDavid Robillard1-0/+1
2020-07-16Add missing variable initializationsDavid Robillard3-6/+7
2020-07-16Fix conversion warningsDavid Robillard3-3/+3
2020-07-16Remove unnecessary definesDavid Robillard1-2/+0
2020-07-16Only define Windows path utility function on WindowsDavid Robillard1-0/+2
Avoids a warning about an unused fuction.
2020-07-16Clean up includesDavid Robillard5-3/+12
2020-06-19Check for CreateSymbolicLink at configure timeDavid Robillard1-18/+2
This uses the system CreateSymbolicLink if it is available at compile time, and if not, just acts as if the link failed (which is extremely likely anyway). This removes the ugly wrapper code that has been a constant source of compatibility headaches with weird toolchains.
2020-05-17Make lilv_world_get() use translationsDavid Robillard1-0/+20
2020-01-18Fix memory leak when dyn-manifest has no pluginsDavid Robillard3-11/+21
2020-01-18Fix cases where incorrect translation is usedDavid Robillard1-8/+15
2020-01-18Clean up i18n codeDavid Robillard1-20/+20
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 Robillard3-8/+33
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 Robillard10-130/+130
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