Socket
Socket
Sign inDemoInstall

fs-extra-async

Package Overview
Dependencies
115
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

1

lib/patch.js

@@ -0,1 +1,2 @@

'use strict';
var fs = require('fs');

@@ -2,0 +3,0 @@ var fsExtra = require('./index.js');

28

lib/posix-path.js
'use strict';
var path;
var etcPath;
var osHomedir;
var osHomedir = require('os-homedir');
var gitPath;
function posix(file) {
function win32(file) {
if(typeof file !== 'string') {
return;
}
if(/^~\//.test(file)) {
if(/^~/.test(file)) {
// 处理linux风格的home路径
file = path.join(osHomedir(), file.slice(2));
file = path.join(osHomedir(), file.slice(1));
} else if('/etc/protocols' === file) {

@@ -23,5 +23,16 @@ file = path.join(etcPath, 'protocol');

}
function posix(file) {
if(typeof file !== 'string') {
return;
}
if(/^~/.test(file)) {
// 处理linux风格的home路径
file = path.join(osHomedir(), file.slice(1));
}
return file;
}
if(process.platform === 'win32') {
path = require('path').win32;
osHomedir = require('os-homedir');
etcPath = path.join(process.env.windir, 'System32/drivers/etc');

@@ -33,7 +44,6 @@ try {

}
module.exports = win32;
} else {
path = require('path').posix;
module.exports = posix;
} else {
module.exports = function() {
return;
};
}

@@ -56,3 +56,3 @@ {

},
"version": "2.0.0"
"version": "2.0.1"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc