From 251ce7fdadb31e7a68eeebf719818daccc70fe11 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Fri, 27 Aug 2021 09:08:19 +0200 Subject: [PATCH] Fixed: Info.plist file with just whitespaces is not treated as an empty file in Node. Trim it and check length. --- Tools/nib2cib/Nib2Cib.j | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Tools/nib2cib/Nib2Cib.j b/Tools/nib2cib/Nib2Cib.j index dfd39a54a..c3d17f854 100644 --- a/Tools/nib2cib/Nib2Cib.j +++ b/Tools/nib2cib/Nib2Cib.j @@ -976,10 +976,14 @@ var /* FILE = require("file"), */ if (!plist) [self failWithMessage:@"Could not read the Info.plist at: " + configPath]; - plist = CFPropertyList.propertyListFromString(plist); + if (plist.trim().length > 0) { + plist = CFPropertyList.propertyListFromString(plist); - if (!plist) - [self failWithMessage:@"Could not parse the Info.plist at: " + configPath]; + if (!plist) + [self failWithMessage:@"Could not parse the Info.plist at: " + configPath]; + } else { + plist = nil; + } } return {path: configPath, plist: plist};