|
From: <mr...@mr...> - 2005-03-09 17:16:21
|
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/09 18:15:53+01:00 mr...@fo... =
# file: do what I mean
# =
# src/file/file.c
# 2005/03/09 18:15:52+01:00 mr...@fo... +8 -10
# do what I mean
# =
diff -Nru a/src/file/file.c b/src/file/file.c
--- a/src/file/file.c 2005-03-09 18:16:10 +01:00
+++ b/src/file/file.c 2005-03-09 18:16:10 +01:00
@@ -89,20 +89,18 @@
url +=3D 5;
=
if(stat64(url, &st)){
- char *d, *e;
-
if(*mode =3D=3D 'r' && mode[1] !=3D '+')
return NULL;
- if(errno !=3D ENOENT || !tc2_url_file_conf_create_dirs)
- return NULL;
=
- d =3D strdup(url);
- e =3D strrchr(d, '/');
- if(e > d){
- *e =3D 0;
- tcmkpath(d, 0777);
+ if(tc2_url_file_conf_create_dirs){
+ char *d =3D strdup(url);
+ char *e =3D strrchr(d, '/');
+ if(e > d){
+ *e =3D 0;
+ tcmkpath(d, 0777);
+ }
+ free(d);
}
- free(d);
} else if(S_ISDIR(st.st_mode)){
return dir_open(url, mode);
}
|