1 diff -dur a/mac_alias/alias.py b/mac_alias/alias.py
2 --- a/mac_alias/alias.py
3 +++ b/mac_alias/alias.py
6 alias.appinfo = appinfo
8 - alias.volume = VolumeInfo (volname.replace('/',':'),
9 + alias.volume = VolumeInfo (volname.decode().replace('/',':'),
10 voldate, fstype, disktype,
12 - alias.target = TargetInfo (kind, filename.replace('/',':'),
13 + alias.target = TargetInfo (kind, filename.decode().replace('/',':'),
15 crdate, creator_code, type_code)
16 alias.target.levels_from = levels_from
20 if tag == TAG_CARBON_FOLDER_NAME:
21 - alias.target.folder_name = value.replace('/',':')
22 + alias.target.folder_name = value.decode().replace('/',':')
23 elif tag == TAG_CNID_PATH:
24 - alias.target.cnid_path = struct.unpack(b'>%uI' % (length // 4),
25 + alias.target.cnid_path = struct.unpack('>%uI' % (length // 4),
27 elif tag == TAG_CARBON_PATH:
28 alias.target.carbon_path = value
30 alias.target.creation_date \
31 = mac_epoch + datetime.timedelta(seconds=seconds)
32 elif tag == TAG_POSIX_PATH:
33 - alias.target.posix_path = value
34 + alias.target.posix_path = value.decode()
35 elif tag == TAG_POSIX_PATH_TO_MOUNTPOINT:
36 - alias.volume.posix_path = value
37 + alias.volume.posix_path = value.decode()
38 elif tag == TAG_RECURSIVE_ALIAS_OF_DISK_IMAGE:
39 alias.volume.disk_image_alias = Alias.from_bytes(value)
40 elif tag == TAG_USER_HOME_LENGTH_PREFIX:
43 b.write(struct.pack(b'>hhQhhQ',
44 TAG_HIGH_RES_VOLUME_CREATION_DATE,
45 - 8, long(voldate * 65536),
46 + 8, int(voldate * 65536),
47 TAG_HIGH_RES_CREATION_DATE,
48 - 8, long(crdate * 65536)))
49 + 8, int(crdate * 65536)))
51 if self.target.cnid_path:
52 - cnid_path = struct.pack(b'>%uI' % len(self.target.cnid_path),
53 + cnid_path = struct.pack('>%uI' % len(self.target.cnid_path),
54 *self.target.cnid_path)
55 b.write(struct.pack(b'>hh', TAG_CNID_PATH,