* Bug in ctxtools --purge
@ 2006-10-18 1:03 Aditya Mahajan
2006-10-18 22:56 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Aditya Mahajan @ 2006-10-18 1:03 UTC (permalink / raw)
Hi Hans,
ctxtools --purge file.tex does not behave the same as
ctxtools --purge file (no extension). This causes texexec --purge
filename to misbehave.
With ctxtools --purge test-04.tex I get
f:\tmp\context\test>ctxtools --purge test-04.tex
CtxTools | purging temporary files : test-04.tex
CtxTools | checking files that match 'test-04.tex-*.*'
CtxTools | checking files that match 'test-04.tex.*'
CtxTools | removed files : 0
CtxTools | kept files : 0
CtxTools | persistent files : 0
CtxTools | reclaimed bytes : 0
which does not delete the temp files. However with ctxtools --purge
test-04 the temp files are deleted.
f:\tmp\context\test>ctxtools --purge test-04
CtxTools | purging temporary files : test-04
CtxTools | checking files that match 'test-04-*.*'
CtxTools | checking files that match 'test-04.*'
CtxTools | removed : test-04-mpgraph.mp
CtxTools | removed : test-04.tui
CtxTools | removed : test-04.log
CtxTools | removed : test-04.tmp
CtxTools | not removed : test-04.tuo
CtxTools | removed files : 4
CtxTools | kept files : 1
CtxTools | persistent files : 0
CtxTools | reclaimed bytes : 23960
Shouldn't both the commands be equivalent. As a consequence of this,
texexec --purge does not delete temp files. I get
CtxTools | purging temporary files : test-04.tex
CtxTools | checking files that match 'test-04.tex-*.*'
CtxTools | checking files that match 'test-04.tex.*'
CtxTools | removed : mpgraph.mp
CtxTools | removed files : 1
CtxTools | kept files : 0
CtxTools | persistent files : 0
CtxTools | reclaimed bytes : 6
Only mpgraph.mp is removed.
Aditya
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug in ctxtools --purge
2006-10-18 1:03 Bug in ctxtools --purge Aditya Mahajan
@ 2006-10-18 22:56 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2006-10-18 22:56 UTC (permalink / raw)
Aditya Mahajan wrote:
> Hi Hans,
>
> ctxtools --purge file.tex does not behave the same as
> ctxtools --purge file (no extension). This causes texexec --purge
> filename to misbehave.
>
> With ctxtools --purge test-04.tex I get
>
> f:\tmp\context\test>ctxtools --purge test-04.tex
> CtxTools | purging temporary files : test-04.tex
> CtxTools | checking files that match 'test-04.tex-*.*'
> CtxTools | checking files that match 'test-04.tex.*'
> CtxTools | removed files : 0
> CtxTools | kept files : 0
> CtxTools | persistent files : 0
> CtxTools | reclaimed bytes : 0
>
> which does not delete the temp files. However with ctxtools --purge
> test-04 the temp files are deleted.
>
> f:\tmp\context\test>ctxtools --purge test-04
> CtxTools | purging temporary files : test-04
> CtxTools | checking files that match 'test-04-*.*'
> CtxTools | checking files that match 'test-04.*'
> CtxTools | removed : test-04-mpgraph.mp
> CtxTools | removed : test-04.tui
> CtxTools | removed : test-04.log
> CtxTools | removed : test-04.tmp
> CtxTools | not removed : test-04.tuo
> CtxTools | removed files : 4
> CtxTools | kept files : 1
> CtxTools | persistent files : 0
> CtxTools | reclaimed bytes : 23960
>
>
> Shouldn't both the commands be equivalent. As a consequence of this,
> texexec --purge does not delete temp files. I get
>
> CtxTools | purging temporary files : test-04.tex
> CtxTools | checking files that match 'test-04.tex-*.*'
> CtxTools | checking files that match 'test-04.tex.*'
> CtxTools | removed : mpgraph.mp
> CtxTools | removed files : 1
> CtxTools | kept files : 0
> CtxTools | persistent files : 0
> CtxTools | reclaimed bytes : 6
>
> Only mpgraph.mp is removed.
>
you can play with this (nosuf):
at the top:
require 'base/file'
and in the purge method:
report("purging#{if purgeall then ' all' end} temporary files : #{pattern.join(' ')}")
pattern.each do |pat|
nosuf = File.unsuffixed(pat)
globbed = if recurse then "**/#{nosuf}-*.*" else "#{nosuf}-*.*" end
report("checking files that match '#{globbed}'")
files = Dir.glob(globbed)
globbed = if recurse then "**/#{nosuf}.*" else "#{nosuf}.*" end
report("checking files that match '#{globbed}'")
files.push(Dir.glob(globbed))
end
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-18 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-18 1:03 Bug in ctxtools --purge Aditya Mahajan
2006-10-18 22:56 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).