TODO is done for filesystem backend moutnpoint check

This commit is contained in:
Johannes Zellner
2020-06-26 17:57:26 +02:00
parent 5199a9342e
commit a96da20536

View File

@@ -54,7 +54,7 @@ function checkPreconditions(apiConfig, dataLayout, callback) {
assert(dataLayout instanceof DataLayout, 'dataLayout must be a DataLayout');
assert.strictEqual(typeof callback, 'function');
// TODO check filesystem is mounted for sshfs and cifs so we don't write into the actual folder on disk
// Check filesystem is mounted so we don't write into the actual folder on disk
if (apiConfig.provider === PROVIDER_SSHFS || apiConfig.provider === PROVIDER_CIFS || apiConfig.provider === PROVIDER_NFS) {
const mounts = safe.fs.readFileSync('/proc/mounts', 'utf8');
const mountInfo = mounts.split('\n').filter(function (l) { return l.indexOf(apiConfig.mountPoint) !== -1; })[0];