On Sat, Apr 29, 2017 at 10:15:15PM -0300, Casimiro de Almeida Barreto wrote:
> Good night all.
> 
> I?ve had trouble in windows concerning FileSystem.
> 
> ((FileSystem disk root) / ?C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt?)
> delete
> 
> Fails as if the file didn?t exist. Message:
> 
> FileDoesNotExist: Path / ?C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt?
> 
> And I wonder what?s wrong. Because it works in linux and MacOS.
> 
> Trasncript show: ((FileSYstem disk root) / ?C:\temp\
> e8720bb4-b90a-0d00-9b1f-008709e5552b.txt?)
> 
> Returns:
> 
> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
> 
> And I wonder where the last \ came from and if is it that is messing all and
> how to fix things.


This is partially related to the problem I reported in "FileReference /
and Parent" in that the filename isn't being parsed properly.  See:

http://forum.world.st/FileReference-and-parent-td4941066.html

Note that the patch I suggest in the email thread doesn't solve the
problem either.

The trailing slash in the example above is because the path isn't being
parsed, the windows file store thinks that there is only a single
segment, which means the drive, so must be a directory.

As a workaround, if you have a complete path string, try using
#asFileReference, e.g.:

'C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt' asFileReference exists


Cheers,
Alistair


Reply via email to