Opendocument fails with ENOENT in macOS
Original Reporter info from Mantis: trev @trevoz
-
Reporter name: Trevor Roydhouse
Original Reporter info from Mantis: trev @trevoz
- Reporter name: Trevor Roydhouse
Description:
procedure TForm1.MenuItemHelpClick(Sender: TObject);
var
helpPath: String;
status: Boolean;
begin
helpPath := GetResourcesPath + 'helpbookassistant.help';
status := OpenDocument(helpPath );
if(status <> true) then
ShowMessage('Opendocument Error: ' + GetLastOSError.ToString);
Memo1.Lines.Add(helpPath);;
end;
Returns 2:
#define ENOENT 2 /* No such file or directory */
I've verified that the directory (Apple help bundle) does exist.
This works perfectly in FPC 3.0.4. I suspect it is related to the change in FPC 3.2.0 regarding not treating UNIX directories as files.
Steps to reproduce:
See above. Compile with FPC 3.0.4 -> works. Compile with FPC 3.2.0 or trunk - fails.