mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-15 07:34:35 -04:00
out_maybe_mkdir: explicit CreateDirectoryA()
& GetFileAttributesA()
This commit is contained in:
parent
ab7da62a3a
commit
c50ddc6cd8
1 changed files with 2 additions and 2 deletions
|
@ -767,7 +767,7 @@ static int out_maybe_mkdir(const char* path)
|
||||||
DWORD dwAttrib;
|
DWORD dwAttrib;
|
||||||
|
|
||||||
/* Try to make the directory */
|
/* Try to make the directory */
|
||||||
if (CreateDirectory(path, NULL) != 0) { /* Non-zero on success */
|
if (CreateDirectoryA(path, NULL) != 0) { /* Non-zero on success */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* If it fails for any reason but already exists, fail */
|
/* If it fails for any reason but already exists, fail */
|
||||||
|
@ -775,7 +775,7 @@ static int out_maybe_mkdir(const char* path)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* Check if the existing path is a directory */
|
/* Check if the existing path is a directory */
|
||||||
if ((dwAttrib = GetFileAttributes(path)) == (DWORD) -1 || !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) {
|
if ((dwAttrib = GetFileAttributesA(path)) == (DWORD) -1 || !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue