While I can't point to any core bug this causes, and this can be solved in contrib, I think that we should save and restore the current working directory because this is a known problem with register_shutdown_function (see comments in thread) and a potential hazard for many people.

I just spent several hours tracking this down from devel, to our stream wrappers, and finally to the fact that the current-working-directory was changed to /. This is a very easy fix in core, very few extra lines, and will probably save other developers lots of time.

CommentFileSizeAuthor
#1 756498.patch748 bytesdouggreen
shutdown-cwd.patch668 bytesdouggreen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

douggreen’s picture

FileSize
748 bytes

rerolled, with proper diff (I hope)

chx’s picture

Status: Needs review » Reviewed & tested by the community

Very very nice job.

moshe weitzman’s picture

Yeah, +1 from me too.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.