summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-12-11 00:11:01 +0000
committerKarl Berry <karl@freefriends.org>2009-12-11 00:11:01 +0000
commit0482d0827662154f492640356e31b5fb7297e3a2 (patch)
tree2a63722d86f5ec2027280c5a56b142e162585366 /Build
parenta7f522b53649f0c836c40c76904e78e3ca2010bb (diff)
allow file..txt, from Manuel and Alexander
git-svn-id: svn://tug.org/texlive/trunk@16346 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog6
-rw-r--r--Build/source/texk/kpathsea/tex-file.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index f23dda6c27a..ad4a2e9ad7b 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-11 Alexander Cherepanov <cherepan@mccme.ru>
+
+ * tex-file.c (kpathsea_name_ok): correct check for /../ so that
+ "file..txt" is still allowed.
+ tlsec mail, 05 Dec 2009 12:33:35.
+
2009-12-05 Karl Berry <karl@tug.org>
Suggested/reported by Daniel Luecking, 16 Nov 2009 11:58:00:
diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c
index 354ed732fc0..5922b3b94b1 100644
--- a/Build/source/texk/kpathsea/tex-file.c
+++ b/Build/source/texk/kpathsea/tex-file.c
@@ -1134,16 +1134,11 @@ kpathsea_name_ok (kpathsea kpse, const_string fname, const_string check_var,
while ((q = strchr (qq, '.'))) { /* at each dot */
if ((q == fname || IS_DIR_SEP (*(q - 1))) /* start or / precedes dot? */
&& !IS_DIR_SEP (*(q + 1)) /* ok if /./ */
- && *(q + 1) != '.' /* ok (for now) if /.. */
+ && !(*(q + 1) == '.' && IS_DIR_SEP (*(q + 2))) /* ok if /../ */
&& !STREQ (q, ".tex")) { /* specially allow .tex */
goto not_ok;
}
qq = q + 1;
- if (*(qq) == '.') { /* further checks if .. */
- qq++;
- if (!IS_DIR_SEP (*qq)) /* ../ ok, all else bad */
- goto not_ok;
- }
}
}
#else