hosting sync fails on pure Windows
When calling s hosting sync or s hosting add on Windows it returns (for chat-app):
Error while syncing (creating) syncano_logo_white.svg Error while syncing (creating) syncano-client.min.js TypeError: Cannot read property 'size' of undefined
Further debugging led me to an issue with Windows path separator, and this code in hosting.js getFilesToUpload function allowed me to fix it temporarily on my local machine:
const fileToUpdate = _lodash2.default.find(remoteFiles, { path: localHostingFilePath.replace('\\','/') });
const payload = { file: _session2.default.connection.file(file.localPath), path: localHostingFilePath.replace('\\','/') };
@pbres It looks like when we are comparing remote paths with local paths we need to be sure that we are comparing path in the same...
For me, the safest is to compare lists e.g. ['my_folder', 'my_subfolder', 'my_file.html'].
To get a list we need to only split by the operator, for local files myPath.split(path.sep) and for remote ones myPath.split(path.posix.sep) (on the server side is always posix).
I'm not sure if we should work on it since we officially only support unix-like envs and "linux on windows".