From 8021034e5871f2d78a55eca558a48515d1cf9edf Mon Sep 17 00:00:00 2001 From: Apple Date: Mon, 17 Mar 2003 21:38:16 +0000 Subject: [PATCH] hfs-116.14.tar.gz --- hfs_util/Info.plist | 2 +- hfs_util/hfsutil_main.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hfs_util/Info.plist b/hfs_util/Info.plist index f794579..61638f3 100644 --- a/hfs_util/Info.plist +++ b/hfs_util/Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType fs CFBundleShortVersionString - 1.2 + 1.2.1 CFBundleSignature ???? CFBundleVersion diff --git a/hfs_util/hfsutil_main.c b/hfs_util/hfsutil_main.c index 4b05202..49ac439 100644 --- a/hfs_util/hfsutil_main.c +++ b/hfs_util/hfsutil_main.c @@ -188,6 +188,7 @@ static int ReadFile(int fd, void *buffer, off_t offset, ssize_t length, static ssize_t readAt( int fd, void * buf, off_t offset, ssize_t length ); static ssize_t writeAt( int fd, void * buf, off_t offset, ssize_t length ); +CF_EXPORT Boolean _CFStringGetFileSystemRepresentation(CFStringRef string, UInt8 *buffer, CFIndex maxBufLen); /* * The fuction CFStringGetSystemEncoding does not work correctly in @@ -547,8 +548,7 @@ DoProbe(char *deviceNamePtr) encoding = CFStringGetSystemEncoding(); cfstr = CFStringCreateWithPascalString(kCFAllocatorDefault, mdbPtr->drVN, encoding); - cfOK = CFStringGetCString(cfstr, volnameUTF8, NAME_MAX, - kCFStringEncodingUTF8); + cfOK = _CFStringGetFileSystemRepresentation(cfstr, volnameUTF8, NAME_MAX); CFRelease(cfstr); if (!cfOK && encoding != kCFStringEncodingMacRoman) { @@ -556,8 +556,7 @@ DoProbe(char *deviceNamePtr) /* default to MacRoman on conversion errors */ cfstr = CFStringCreateWithPascalString(kCFAllocatorDefault, mdbPtr->drVN, kCFStringEncodingMacRoman); - CFStringGetCString(cfstr, volnameUTF8, NAME_MAX, - kCFStringEncodingUTF8); + _CFStringGetFileSystemRepresentation(cfstr, volnameUTF8, NAME_MAX); CFRelease(cfstr); } -- 2.45.2