Filesystem: migrate from ospath.home() to os.homedir()

This commit is contained in:
Jesse Chan
2020-08-26 20:12:03 +08:00
parent c37af39df2
commit 10b75b4f74
3 changed files with 2 additions and 8 deletions

5
package-lock.json generated
View File

@@ -12253,11 +12253,6 @@
"os-tmpdir": "^1.0.0"
}
},
"ospath": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz",
"integrity": "sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs="
},
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",

View File

@@ -78,7 +78,6 @@
"nedb": "^1.8.0",
"node-sass": "^4.13.0",
"object-assign": "4.1.1",
"ospath": "^1.2.2",
"pascal-case": "^3.1.1",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",

View File

@@ -1,9 +1,9 @@
const fs = require('fs');
const ospath = require('ospath');
const os = require('os');
const path = require('path');
const getDirectoryList = (options, callback) => {
const sourcePath = (options.path || '/').replace(/^~/, ospath.home());
const sourcePath = (options.path || '/').replace(/^~/, os.homedir());
try {
const directories = [];