mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-17 23:55:04 +00:00
Fix for root-mounted shared bus paths
This commit is contained in:
parent
fb541795ec
commit
1d781644de
@ -40,6 +40,7 @@ void file_mutex_get(FileMutex* mutex, const char* path) {
|
||||
for (auto& entry : mutex_entries) {
|
||||
// Match the mount path itself, or a descendant (e.g. "/sdcard" registered, "/sdcard/config.json" requested).
|
||||
bool is_match = path_string == entry.path ||
|
||||
(entry.path == "/" && !path_string.empty() && path_string[0] == '/') ||
|
||||
(path_string.rfind(entry.path, 0) == 0 && path_string[entry.path.size()] == '/');
|
||||
if (is_match) {
|
||||
memcpy(mutex, &entry.mutex, sizeof(FileMutex));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user