ObjFW  Check-in [698a1b8b13]

Overview
Comment:OFFileManager: Make sure the FS is initialized
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 698a1b8b135fd9d3e440c19aaa02a76ef74369f3497d062d6befa14c53365cc7
User & Date: js on 2018-08-25 18:58:24
Other Links: manifest | tags
Context
2018-08-25
19:02
Use the same path handling on Wii as on 3DS check-in: 4d2a22a5d9 user: js tags: trunk
18:58
OFFileManager: Make sure the FS is initialized check-in: 698a1b8b13 user: js tags: trunk
18:32
OFException: Reduce backtrace size to 16 check-in: c272d187d7 user: js tags: trunk
Changes

Modified src/OFFileManager.m from [e01277d683] to [9bd4d12514].

157
158
159
160
161
162
163






164
165
166
167
168
169
170
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176







+
+
+
+
+
+








	if ((IDOS = (struct DOSIFace *)
	    GetInterface(DOSBase, "main", 1, NULL)) == NULL)
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
#endif

	/*
	 * Make sure OFFile is initialized.
	 * On some systems, this is needed to initialize the file system driver.
	 */
	[OFFile class];

	defaultManager = [[OFFileManager_default alloc] init];
}

+ (OFFileManager *)defaultManager
{
	return defaultManager;
}

Modified src/OFURLHandler_file.m from [f04b110da0] to [39fecea33b].

437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
437
438
439
440
441
442
443






444
445
446
447
448
449
450







-
-
-
-
-
-







#ifdef OF_WINDOWS
	HMODULE module;
#endif

	if (self != [OFURLHandler_file class])
		return;

	/*
	 * Make sure OFFile is initialized.
	 * On some systems, this is needed to initialize the file system driver.
	 */
	[OFFile class];

#ifdef OF_AMIGAOS4
	if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL)
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];

	if ((IDOS = (struct DOSIFace *)
	    GetInterface(DOSBase, "main", 1, NULL)) == NULL)
476
477
478
479
480
481
482






483
484
485
486
487
488
489
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489







+
+
+
+
+
+








#ifdef OF_WINDOWS
	if ((module = LoadLibrary("kernel32.dll")) != NULL)
		func_CreateSymbolicLinkW =
		    (WINAPI BOOLEAN (*)(LPCWSTR, LPCWSTR, DWORD))
		    GetProcAddress(module, "CreateSymbolicLinkW");
#endif

	/*
	 * Make sure OFFile is initialized.
	 * On some systems, this is needed to initialize the file system driver.
	 */
	[OFFile class];
}

+ (bool)of_directoryExistsAtPath: (OFString *)path
{
	of_stat_t s;

	if (of_stat(path, &s) == -1)