From 10d9eae13bb2408982eea60f1b2eb529f6c74647 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 14 Sep 2024 18:40:24 +0800 Subject: [PATCH] conf: fix false plist write error in config_set_device_record Thanks to @xunmod for reporting! --- src/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 2e6c97fa..532dedc4 100644 --- a/src/conf.c +++ b/src/conf.c @@ -431,7 +431,7 @@ int config_set_device_record(const char *udid, char* record_data, uint64_t recor remove(device_record_file); /* store file */ - if (!plist_write_to_file(plist, device_record_file, PLIST_FORMAT_XML, 0)) { + if (plist_write_to_file(plist, device_record_file, PLIST_FORMAT_XML, 0) != PLIST_ERR_SUCCESS) { usbmuxd_log(LL_DEBUG, "Could not open '%s' for writing: %s", device_record_file, strerror(errno)); res = -ENOENT; }