mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add subsurface_access()
For our usage the method will acept UTF-8 paths, which are converted to UTF-16 on Win32. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
61dc19d2e0
commit
4096383fb5
5 changed files with 26 additions and 2 deletions
7
macos.c
7
macos.c
|
@ -11,7 +11,7 @@
|
|||
#include <sys/syslimits.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void subsurface_user_info(struct user_info *info)
|
||||
{ /* Nothing, let's use libgit2-20 on MacOS */ }
|
||||
|
@ -147,6 +147,11 @@ void *subsurface_opendir(const char *path)
|
|||
return (void *)opendir(path);
|
||||
}
|
||||
|
||||
int subsurface_access(const char *path, int mode)
|
||||
{
|
||||
return access(path, mode);
|
||||
}
|
||||
|
||||
struct zip *subsurface_zip_open_readonly(const char *path, int flags, int *errorp)
|
||||
{
|
||||
return zip_open(path, flags, errorp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue