Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
05c44474
Commit
05c44474
authored
Oct 07, 2015
by
Sebastian Ramacher
Browse files
Simplify code a bit
parent
6a676cc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
zathura/zathura.c
View file @
05c44474
...
...
@@ -576,13 +576,7 @@ get_formatted_filename(zathura_t* zathura, const char* file_path, bool statusbar
&&
g_str_has_prefix
(
file_path
,
home
)
&&
(
!
file_path
[
home_len
]
||
file_path
[
home_len
]
==
'/'
))
{
size_t
remaining_len
=
file_path_len
-
home_len
;
GString
*
remaining_path
=
g_string_new_len
(
&
file_path
[
home_len
],
remaining_len
);
char
*
tilde_path
=
g_strdup_printf
(
"~%s"
,
remaining_path
->
str
);
g_string_free
(
remaining_path
,
true
);
return
tilde_path
;
return
g_strdup_printf
(
"~%s"
,
&
file_path
[
home_len
]);
}
else
{
return
g_strdup
(
file_path
);
}
...
...
Write
Preview
Supports
Markdown
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