Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
3899d568
Verified
Commit
3899d568
authored
3 years ago
by
Tobias Frisch
Browse files
Options
Downloads
Patches
Plain Diff
[
#100
] Fix for Windows being special of course
Signed-off-by:
Tobias Frisch
<
tfrisch@uni-koblenz.de
>
parent
27780b2d
No related branches found
No related tags found
No related merge requests found
Pipeline
#26414
failed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/vkcv/File.cpp
+19
-0
19 additions, 0 deletions
src/vkcv/File.cpp
with
19 additions
and
0 deletions
src/vkcv/File.cpp
+
19
−
0
View file @
3899d568
...
...
@@ -2,7 +2,14 @@
#include
"vkcv/File.hpp"
#include
<stdlib.h>
#ifdef _WIN32
#include
<io.h>
#else
#include
<unistd.h>
#endif
#include
"vkcv/Logger.hpp"
namespace
vkcv
{
...
...
@@ -15,13 +22,25 @@ namespace vkcv {
}
char
name
[
16
]
=
"vkcv_tmp_XXXXXX"
;
#ifdef _WIN32
int
err
=
_mktemp_s
(
name
,
16
)
if
(
err
!=
0
)
{
vkcv_log
(
LogLevel
::
ERROR
,
"Temporary file path could not be generated"
);
return
""
;
}
#else
int
fd
=
mkstemp
(
name
);
if
(
fd
==
-
1
)
{
vkcv_log
(
LogLevel
::
ERROR
,
"Temporary file path could not be generated"
);
return
""
;
}
close
(
fd
);
#endif
return
tmp
/
name
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment