Create directory if necessary.

This commit is contained in:
Michael Jumper 2013-10-22 18:55:58 -07:00
parent 655cb8e9f2
commit 3400e9b122

View File

@ -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 */
fd = open(real_path, flags, S_IRUSR | S_IWUSR);
if (fd == -1)