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
5b6a3992
Commit
5b6a3992
authored
Mar 19, 2012
by
Moritz Lipp
Browse files
Merge branch 'develop' of pwmt.org:zathura into develop
parents
0a0c712e
2475c371
Changes
4
Hide whitespace changes
Inline
Side-by-side
document.c
View file @
5b6a3992
...
...
@@ -209,7 +209,7 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* password
return
NULL
;
}
if
(
file_e
xi
st
s
(
path
)
==
false
)
{
if
(
g_
file_
t
est
(
path
,
G_FILE_TEST_EXISTS
)
==
FALSE
)
{
girara_error
(
"File '%s' does not exist"
,
path
);
return
NULL
;
}
...
...
tests/test_utils.c
View file @
5b6a3992
...
...
@@ -4,10 +4,6 @@
#include "../utils.h"
START_TEST
(
test_file_exists_null
)
{
fail_unless
(
file_exists
(
NULL
)
==
false
,
NULL
);
}
END_TEST
START_TEST
(
test_file_get_extension_null
)
{
fail_unless
(
file_get_extension
(
NULL
)
==
NULL
,
NULL
);
}
END_TEST
...
...
@@ -34,11 +30,6 @@ Suite* suite_utils()
TCase
*
tcase
=
NULL
;
Suite
*
suite
=
suite_create
(
"Utils"
);
/* file exists */
tcase
=
tcase_create
(
"file_exists"
);
tcase_add_test
(
tcase
,
test_file_exists_null
);
suite_add_tcase
(
suite
,
tcase
);
/* file exists */
tcase
=
tcase_create
(
"file_get_extension"
);
tcase_add_test
(
tcase
,
test_file_get_extension_null
);
...
...
utils.c
View file @
5b6a3992
...
...
@@ -17,16 +17,6 @@
#define BLOCK_SIZE 64
bool
file_exists
(
const
char
*
path
)
{
if
(
!
access
(
path
,
F_OK
))
{
return
true
;
}
else
{
return
false
;
}
}
const
char
*
file_get_extension
(
const
char
*
path
)
{
...
...
utils.h
View file @
5b6a3992
...
...
@@ -17,14 +17,6 @@ typedef struct page_offset_s
int
y
;
}
page_offset_t
;
/**
* Checks if the given file exists
*
* @param path Path to the file
* @return true if the file exists, otherwise false
*/
bool
file_exists
(
const
char
*
path
);
/**
* Returns the file extension of a 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