Skip to content

IFolder.CheckExistsAsync - different behavior between Desktop and UWP #59

@mr-intj

Description

@mr-intj

In UWP, the following code would return ExistenceCheckResult.NotFound.
In Desktop, LocalStorage is essentially ignored in the code below, and the result returned is ExistenceCheckResult.FileExists ...

var result = await FileSystem.Current.LocalStorage.CheckExistsAsync("e:\\dir1\\dir2\\file.xml");

The reason is due to the (documented) behavior of Path.Combine, which is used in the Desktop implementation of IFolder.CheckExistsAsync:

public static string Combine(string path1, string path2)

If path2 contains an absolute path, this method returns path2.

Can someone comment on whether this is intentional behavior or a bug in IFolder.CheckExistsAsync?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions