Project

Profile

Help

Support #4891

closed

hedge case?: file:copy deletes destination

Added by Giuseppe Bonelli about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-02-04
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Hi, I am running SaxonPE9-9-1-8J under ubuntu (from a windows10 unix subsystem bash shell) and I found this:

when:

<xsl:variable name="src" select="file:///dir/File.ext"/>

<xsl:variable name="dst" select="file:///dir/file.ext"/>

I.e. $dst=lower-case($src)

then:

<xsl:value-of select="file:move($src, $dst)"/>

deletes the file at $dst

The easy workaround is:

<xsl:variable name="dst_tmp" select="concat($dst, '_tmp')"/>

<xsl:value-of select="file:move($src, $dst_tmp)"/>

<xsl:value-of select="file:move($dst_tmp, $dst)"/>

but maybe this shoud be investigated.

I have not tried under a regular bash shell, so maybe this is specific to Windows10 unix subsystem

Thanks

Please register to edit this issue

Also available in: Atom PDF