Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
7207d0c2
Commit
7207d0c2
authored
May 17, 2021
by
Gauthier Quesnel
Browse files
dialog: fix linux integer convertion
parent
7b2b3be9
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/gui/dialog-file.cpp
View file @
7207d0c2
...
...
@@ -83,11 +83,13 @@ std::optional<std::filesystem::path>
get_executable_directory
()
{
std
::
vector
<
char
>
buf
(
PATH_MAX
,
'\0'
);
const
auto
size
=
readlink
(
"/proc/self/exe"
,
buf
.
data
(),
PATH_MAX
);
const
auto
s
size
=
readlink
(
"/proc/self/exe"
,
buf
.
data
(),
PATH_MAX
);
if
(
size
<=
0
)
if
(
s
size
<=
0
)
return
std
::
nullopt
;
const
auto
size
=
static_cast
<
size_t
>
(
ssize
);
return
std
::
filesystem
::
path
{
std
::
string_view
{
buf
.
data
(),
size
}
};
}
#elif defined(__APPLE__)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment