From: Carl Hetherington Date: Fri, 3 Apr 2020 21:03:51 +0000 (+0200) Subject: Trim spaces from vendor/model. X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=68ede5cc5b72f85a42c3c20ce69ed4849dd6e51e;p=dcpomatic.git Trim spaces from vendor/model. --- diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index a95854015..2c97ab1ab 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -257,12 +257,14 @@ disk_appeared (DADiskRef disk, void* context) void const* str = CFDictionaryGetValue (description, kDADiskDescriptionDeviceVendorKey); if (str) { vendor = CFStringGetCStringPtr ((CFStringRef) str, kCFStringEncodingUTF8); + vendor = boost::algorithm::trim (*vendor); } optional model; str = CFDictionaryGetValue (description, kDADiskDescriptionDeviceModelKey); if (str) { model = CFStringGetCStringPtr ((CFStringRef) str, kCFStringEncodingUTF8); + model = boost::algorithm::trim (*model); } str = CFDictionaryGetValue (description, kDADiskDescriptionMediaPathKey);