aboutsummaryrefslogtreecommitdiff
path: root/elogv
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2014-10-26 02:43:33 +0200
committerSebastian Pipping <sebastian@pipping.org>2014-10-26 02:43:33 +0200
commit42d2b5c042631aded21e70fc0a2526ee4c99d076 (patch)
tree1972f72268ceb9cd0c040c05674fa0d77ab14ba2 /elogv
parentFix crash when log files with bad names are found, only (diff)
downloadelogv-42d2b5c042631aded21e70fc0a2526ee4c99d076.tar.gz
elogv-42d2b5c042631aded21e70fc0a2526ee4c99d076.tar.bz2
elogv-42d2b5c042631aded21e70fc0a2526ee4c99d076.zip
Fix crash for PORT_LOGDIR containing ".log" (issue #4)
Diffstat (limited to 'elogv')
-rwxr-xr-xelogv2
1 files changed, 1 insertions, 1 deletions
diff --git a/elogv b/elogv
index 1eb04c4..853d404 100755
--- a/elogv
+++ b/elogv
@@ -378,7 +378,7 @@ class ElogViewer:
# then we split the string using as pattern / or : to obtain in any
# case
# ( "x11-themes", "haematite-xcursors", "1.0:20091018-195827.log")
- tmpfilepath = re.sub('\.log.*$', '.log', filepath)
+ tmpfilepath = re.sub('\\.log[^/]*$', '.log', filepath)
split_up = re.split(":|" + os.path.sep, tmpfilepath.replace(elogdir + os.path.sep, ""))
if len(split_up) < 3:
continue