PiRSquared17 / wiki2latex

Automatically exported from code.google.com/p/wiki2latex
0 stars 0 forks source link

More conservative delete of temp files #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When deleting the temporary files, all files in the "tmp" subdirectory of
w2l are removed. However, I have a .htaccess file in tmp to allow browsing
of its subdirectories. I do not want that file to be removed.

I have patched w2lCore.php such that an item is only removed from tmp if:
- it is a directory, and
- its name starts with "tmp"

Of course, this removal is recursive. Deletion of all such items is always
attempted even if deletion of one of them fails.

See the attached diff.

I think this still removes all files/subdirectories in tmp that are ever
created by w2l.

PS This also prevents the software from attempting to remove ".svn"
subdirectories, which is useful when using an SVN version of w2l.

Original issue reported on code.google.com by s.c.w.pl...@gmail.com on 9 Jul 2008 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
This diff fixes a mistake in the previous one, resulting from PHP's 
short-circuit
evaluation.

Original comment by s.c.w.pl...@gmail.com on 9 Jul 2008 at 10:07

Attachments:

GoogleCodeExporter commented 9 years ago
Yes that makes sense. I modified your patch a bit, and now it's in for 0.9. 
Thank you
for reporting this issue.

Original comment by hansgeorg.kluge@gmail.com on 10 Jul 2008 at 8:30

GoogleCodeExporter commented 9 years ago

Original comment by hansgeorg.kluge@gmail.com on 10 Jul 2008 at 8:30

GoogleCodeExporter commented 9 years ago

Original comment by hansgeorg.kluge@gmail.com on 2 Sep 2008 at 1:50

GoogleCodeExporter commented 9 years ago

Original comment by hansgeorg.kluge@gmail.com on 2 Sep 2008 at 1:51

GoogleCodeExporter commented 9 years ago

Original comment by hansgeorg.kluge@gmail.com on 17 Feb 2011 at 10:38