git ssb

0+

cel-desktop / ssb-pkg



Tree: 1eb144e388da5f1a3466703f56ac4ab591d700fc

Files: 1eb144e388da5f1a3466703f56ac4ab591d700fc / test / test-50-observe-snapshot-root / test-x-index.js

684 bytesRaw
1'use strict';
2
3var fs = require('fs');
4var path = require('path');
5
6if (process.platform === 'win32') {
7 var root = path.parse(process.argv[1]).root; // D:\\
8 if (fs.statSync(root + 'snapshot').isDirectory()) {
9 var root2 = root.slice(0, 2) + '/';
10 if (fs.statSync(root2 + 'snapshot').isDirectory()) {
11 try {
12 fs.statSync('/snapshot');
13 } catch (error) {
14 if (error.code === 'ENOENT') {
15 console.log('ok');
16 }
17 }
18 }
19 }
20} else {
21 if (fs.statSync('/snapshot').isDirectory()) {
22 try {
23 fs.statSync('K:\\snapshot');
24 } catch (error) {
25 if (error.code === 'ENOENT') {
26 console.log('ok');
27 }
28 }
29 }
30}
31

Built with git-ssb-web