summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-30 01:49:38 +0200
committerDan McGee <dan@archlinux.org>2011-08-02 14:20:34 +0200
commitcbaff216b3eca57b4fd717da53f43a6713722e95 (patch)
tree1ef21cb061959410a827c3123ca0e7a28f7610a6 /lib/libalpm/util.h
parent573260556db49c62f5cf751f53812b7e06c1decb (diff)
downloadpacman-cbaff216b3eca57b4fd717da53f43a6713722e95.tar.gz
pacman-cbaff216b3eca57b4fd717da53f43a6713722e95.tar.xz
Don't trim whitespace when reading database entries
We don't write with extra or unknown whitespace, so there is little reason for us to trim it when reading either. This also fixes the hopefully never encountered "paths that start or end with spaces" issue, for which two pactests have been added. The tests also contain other evil characters that we have encountered before and handle just fine, but it doesn't hurt to ensure we don't break such support in the future. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r--lib/libalpm/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index a75c5aae..9ee63709 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -95,6 +95,7 @@ int _alpm_makepath(const char *path);
int _alpm_makepath_mode(const char *path, mode_t mode);
int _alpm_copyfile(const char *src, const char *dest);
char *_alpm_strtrim(char *str);
+size_t _alpm_strip_newline(char *str);
int _alpm_unpack_single(alpm_handle_t *handle, const char *archive,
const char *prefix, const char *filename);
int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,