poldek: poldek/vfile/vfile.c, poldek/vfile/vfile.h - vf_cachepath(...
mis
mis at pld-linux.org
Sun Aug 20 20:12:18 CEST 2006
Author: mis Date: Sun Aug 20 18:12:18 2006 GMT
Module: poldek Tag: HEAD
---- Log message:
- vf_cachepath(): path to directory, not to file
---- Files affected:
poldek/poldek/vfile:
vfile.c (1.68 -> 1.69) , vfile.h (1.47 -> 1.48)
---- Diffs:
================================================================
Index: poldek/poldek/vfile/vfile.c
diff -u poldek/poldek/vfile/vfile.c:1.68 poldek/poldek/vfile/vfile.c:1.69
--- poldek/poldek/vfile/vfile.c:1.68 Sun Aug 20 15:59:55 2006
+++ poldek/poldek/vfile/vfile.c Sun Aug 20 20:12:13 2006
@@ -608,20 +608,20 @@
}
-int vf_cachepath(char *path, size_t size, const char *ofpath)
+int vf_cachepath(char *path, size_t size, const char *ofdirpath)
{
int n, len;
len = strlen(vfile_conf.cachedir);
- n_assert(strlen(ofpath) > 0);
- n_assert(ofpath[strlen(ofpath) - 1] != '/'); /* not a dir */
+ n_assert(strlen(ofdirpath) > 0);
+ n_assert(ofdirpath[strlen(ofdirpath) - 1] != '/'); /* not a dir */
- if (strncmp(ofpath, vfile_conf.cachedir, len) == 0) {
- n = n_snprintf(path, size, "%s", ofpath);
+ if (strncmp(ofdirpath, vfile_conf.cachedir, len) == 0) {
+ n = n_snprintf(path, size, "%s", ofdirpath);
} else {
- n = vf_localpath(path, size, ofpath);
+ n = vf_localdirpath(path, size, ofdirpath);
}
return n;
================================================================
Index: poldek/poldek/vfile/vfile.h
diff -u poldek/poldek/vfile/vfile.h:1.47 poldek/poldek/vfile/vfile.h:1.48
--- poldek/poldek/vfile/vfile.h:1.47 Sun Aug 20 15:59:55 2006
+++ poldek/poldek/vfile/vfile.h Sun Aug 20 20:12:13 2006
@@ -195,8 +195,8 @@
int vf_localpath(char *path, size_t size, const char *url);
int vf_localdirpath(char *path, size_t size, const char *url);
-/* ofpath to path under cache dirctory */
-int vf_cachepath(char *path, size_t size, const char *ofpath);
+/* ofdirpath to path under cache dirctory */
+int vf_cachepath(char *path, size_t size, const char *ofdirpath);
/* unlink local copy */
int vf_localunlink(const char *path);
================================================================
---- CVS-web:
http://cvs.pld-linux.org/poldek/poldek/vfile/vfile.c?r1=1.68&r2=1.69&f=u
http://cvs.pld-linux.org/poldek/poldek/vfile/vfile.h?r1=1.47&r2=1.48&f=u
More information about the pld-cvs-commit
mailing list