Should excess path separators (`/`) be allowed in Gaia paths?


After messing around with implementing a Dropbox driver for Gaia, I noticed that Dropbox didn’t play nice with excess file separators, i.e. in Graphites /documents folder (ends up being {address}//documents/{file}.json, or as how my extension has (unfortunately) been storing the avatar in {address}//avatar-0.

In directories, Dropbox just trims them out – while “in files” the file itself just doesn’t get uploaded.

Should there be a standard or something coded to remove excess /'s so the inconsistencies can be smoothed out? It would probably be both client and server side, and would help a lot with a small issue like this.


For me, personally, I just decided to use a

path.replace(/\/{2,}/g, '/')

to normalize all routes and skip “unnamed” directories (though this may provide issues for list-files). In addition, I rose an issue here for discussion on Github.

1 Like

Thanks for opening the issue. The double-path-separators should be cleaned up by the drivers or hub itself.

1 Like