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
c3337bdd
Commit
c3337bdd
authored
Dec 06, 2015
by
Sebastian Ramacher
Browse files
Also handle file:// URIs
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
bf73069d
Pipeline
#29
skipped
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
zathura/zathura.c
View file @
c3337bdd
...
...
@@ -571,11 +571,18 @@ document_info_open(gpointer data)
document_info
->
zathura
->
stdin_support
.
file
=
g_strdup
(
file
);
}
}
else
{
GFile
*
gf
=
g_file_new_for_commandline_arg
(
document_info
->
path
);
if
(
g_file_is_native
(
gf
))
{
file
=
g_strdup
(
document_info
->
path
);
GFile
*
gf
=
g_file_new_for_commandline_arg
(
document_info
->
path
);
if
(
g_file_is_native
(
gf
)
==
TRUE
)
{
/* file was given as a native path */
file
=
g_file_get_path
(
gf
);
}
else
{
char
*
gf_file_path
=
g_file_get_path
(
gf
);
if
(
gf_file_path
!=
NULL
)
{
/* file is not given via a native path, but available from a path */
file
=
gf_file_path
;
}
else
{
/* copy file with GIO */
file
=
prepare_document_open_from_gfile
(
document_info
->
zathura
,
gf
);
if
(
file
==
NULL
)
{
girara_notify
(
document_info
->
zathura
->
ui
.
session
,
GIRARA_ERROR
,
...
...
@@ -584,6 +591,7 @@ document_info_open(gpointer data)
document_info
->
zathura
->
stdin_support
.
file
=
g_strdup
(
file
);
}
}
}
g_object_unref
(
gf
);
}
...
...
Sebastian Ramacher
@sebastinas
mentioned in commit
3d148945
·
Dec 06, 2015
mentioned in commit
3d148945
mentioned in commit 3d14894549fc69b2aca1455c95cc8c272a192153
Toggle commit list
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