Skip to content

Double slashes in filesystem paths on iOS #502

Open
@flashman2

Description

@flashman2

Filesystem functions works fine on Androi, but on iOS there is a problem:
Try to list files in dir with lstat:
RNFetchBlob.fs
.lstat(sourceDir)
.then(filesObjList => {
console.log('fileManager filesList:' + JSON.stringify(filesObjList));

Then I see in console double slashes in files paths like this:
[{"size":"20480","path":"/Users/user/Library/Developer/CoreSimulator/Devices/XXXXX/data/Containers/Data/Application/YYYYY/Documents/content/Content01/Subcontent//.index.html.swp","filename":".index.html.swp","lastModified":1571680744000,"type":"file"},

You can see double slashes before .index.html.swp file. All other files and dirs in this dir also have double slashes in paths!

MacOS Mojave,
"react-native": "0.61.5"
"rn-fetch-blob": "^0.11.2"

Because of this bug, file copying works with bugs on iOS if use files paths from lstat()!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions