Create directory if necessary.
This commit is contained in:
parent
655cb8e9f2
commit
3400e9b122
@ -199,6 +199,10 @@ int guac_rdpdr_fs_open(guac_rdpdr_device* device, const char* path,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Create directory first, if necessary */
|
||||||
|
if (file_attributes & FILE_ATTRIBUTE_DIRECTORY && (flags & O_CREAT))
|
||||||
|
mkdir(real_path, S_IRWXU);
|
||||||
|
|
||||||
/* Open file */
|
/* Open file */
|
||||||
fd = open(real_path, flags, S_IRUSR | S_IWUSR);
|
fd = open(real_path, flags, S_IRUSR | S_IWUSR);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user