The second example works fine on Linux, in fact. At least it does for
me. Linux is happy to delete a file which somebody has opened, and it
will arrange for the file to go away once everybody is done with it.

I (think I) agree in principle that the right answer is for Zorba to
materialize streams when the underlying data source goes away, as in
file:delete(). However, I have to admit I can't imagine how to implement
that. The Zorba compiler almost certainly can't do it by itself in this
case, since the thing being deleted ($file) isn't even the same variable
that needs to be materialized ($data). Fixing this might be a major

I'm assigning to Markos to see if he has any thoughts about whether this
is feasible and/or should be attempted.

** Changed in: zorba
     Assignee: Chris Hillery (ceejatec) => Markos Zaharioudakis (markos-za)

You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.

  open filestream prevents file deletion on windows

Status in Zorba - The XQuery Processor:

Bug description:
  the bug fix for bug #996084 seems to be a bit more tricky on windows.
  If you execute the attached example on a windows machine you will get:

  user-defined error [file:FOFL9999]: An unknown error occured:
  "C:\data.txt": I/O error: 32 failed (error The process cannot access
  the file because it is being used by another process): Can not delete
  file: C:\data.txt; raised at

  The problem is that the file cannot be deleted as long as the file
  stream is open. This example query works on linux.

  This makes the 2 tests test/rbkt/zorba/file/copy_* fail on windows.
  Any idea how to solve this?

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to