projects
/
m17n
/
m17n-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fdc494
)
(mdatabase__find_file): Return a copy of filename if
author
handa
<handa>
Fri, 3 Oct 2008 02:48:15 +0000
(
02:48
+0000)
committer
handa
<handa>
Fri, 3 Oct 2008 02:48:15 +0000
(
02:48
+0000)
it is absolute pathname.
src/database.c
patch
|
blob
|
history
diff --git
a/src/database.c
b/src/database.c
index
e0f4451
..
887f46a
100644
(file)
--- a/
src/database.c
+++ b/
src/database.c
@@
-1061,7
+1061,7
@@
mdatabase__find_file (char *filename)
MDatabaseInfo db_info;
if (filename[0] == PATH_SEPARATOR)
- return (stat (filename, &buf) == 0 ? filename : NULL);
+ return (stat (filename, &buf) == 0 ? strdup (filename) : NULL);
db_info.filename = filename;
db_info.len = strlen (filename);
db_info.time = 0;