ObjFW  Check-in [cf233b2d5b]

Overview
Comment:OFFileURLHandler: Support setting mtime on Win98
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | set-mtime
Files: files | file ages | folders
SHA3-256: cf233b2d5b0d1d4ab9abbda01c72b8f7db091aef574d69452b5d0b8d5271336d
User & Date: js on 2020-06-01 18:46:04
Other Links: branch diff | manifest | tags
Context
2020-06-01
19:09
OFFileURLHandler: Support setting atime and mtime check-in: c6b128a2f9 user: js tags: set-mtime
18:46
OFFileURLHandler: Support setting mtime on Win98 check-in: cf233b2d5b user: js tags: set-mtime
18:24
OFFileURLHandler: Weakly link _wutime64 check-in: 1fedd3e87a user: js tags: set-mtime
Changes

Modified src/OFFileURLHandler.m from [8f66089176] to [89f5c5d688].

632
633
634
635
636
637
638

639

640






641
642
643
644
645
646
647
				       errNo: errno];
		}
	} else {
		struct _utimbuf times = {
			(time_t)timeInterval,
			(time_t)timeInterval
		};



		if (_wutime([path UTF16String], &times) != 0) {






			of_file_attribute_key_t failedAttribute =
			    of_file_attribute_key_modification_date;

			@throw [OFSetItemAttributesFailedException
			    exceptionWithURL: URL
				  attributes: attributes
			     failedAttribute: failedAttribute







>

>
|
>
>
>
>
>
>







632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
				       errNo: errno];
		}
	} else {
		struct _utimbuf times = {
			(time_t)timeInterval,
			(time_t)timeInterval
		};
		int status;

		if ([OFSystemInfo isWindowsNT])
			status = _wutime([path UTF16String], &times);
		else
			status = _utime(
			    [path cStringWithEncoding: [OFLocale encoding]],
			    &times);

		if (status != 0) {
			of_file_attribute_key_t failedAttribute =
			    of_file_attribute_key_modification_date;

			@throw [OFSetItemAttributesFailedException
			    exceptionWithURL: URL
				  attributes: attributes
			     failedAttribute: failedAttribute