Merge two g_file_test calls into one
This commit is contained in:
parent
c5070bfcac
commit
2083433739
1 changed files with 1 additions and 2 deletions
|
@ -142,8 +142,7 @@ sokoke_magic_uri (const gchar* uri,
|
||||||
if (g_path_is_absolute (uri))
|
if (g_path_is_absolute (uri))
|
||||||
return g_strconcat ("file://", uri, NULL);
|
return g_strconcat ("file://", uri, NULL);
|
||||||
/* Construct an absolute path if the file is relative */
|
/* Construct an absolute path if the file is relative */
|
||||||
if (g_file_test (uri, G_FILE_TEST_EXISTS)
|
if (g_file_test (uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||||
&& g_file_test (uri, G_FILE_TEST_IS_REGULAR))
|
|
||||||
{
|
{
|
||||||
current_dir = g_get_current_dir ();
|
current_dir = g_get_current_dir ();
|
||||||
result = g_strconcat ("file://", current_dir,
|
result = g_strconcat ("file://", current_dir,
|
||||||
|
|
Loading…
Reference in a new issue