parent
9d10bf58a3
commit
bbcb8b3ae0
@ -448,7 +448,9 @@ exports.existsSync = util.deprecate(function(path) {
|
|||||||
|
|
||||||
if (isWindows) {
|
if (isWindows) {
|
||||||
exports._makeLong = function(path) {
|
exports._makeLong = function(path) {
|
||||||
path = '' + path;
|
if (typeof path !== 'string')
|
||||||
|
return path;
|
||||||
|
|
||||||
if (!path) {
|
if (!path) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
var assert = require('assert');
|
||||||
var assert = require('assert');
|
var path = require('path');
|
||||||
var path = require('path');
|
var common = require('../common');
|
||||||
var common = require('../common');
|
|
||||||
|
|
||||||
|
if (process.platform === 'win32') {
|
||||||
var file = path.join(common.fixturesDir, 'a.js');
|
var file = path.join(common.fixturesDir, 'a.js');
|
||||||
var resolvedFile = path.resolve(file);
|
var resolvedFile = path.resolve(file);
|
||||||
|
|
||||||
@ -36,3 +36,9 @@ if (process.platform === 'win32') {
|
|||||||
assert.equal('\\\\.\\pipe\\somepipe',
|
assert.equal('\\\\.\\pipe\\somepipe',
|
||||||
path._makeLong('\\\\.\\pipe\\somepipe'));
|
path._makeLong('\\\\.\\pipe\\somepipe'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert.equal(path._makeLong(null), null);
|
||||||
|
assert.equal(path._makeLong(100), 100);
|
||||||
|
assert.equal(path._makeLong(path), path);
|
||||||
|
assert.equal(path._makeLong(false), false);
|
||||||
|
assert.equal(path._makeLong(true), true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user