⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
true-case-path
/
Edit File: index.js
'use strict' var glob = require('glob') var path = require('path') function trueCasePathSync(fsPath) { // Normalize the path so as to resolve . and .. components. // !! As of Node v4.1.1, a path starting with ../ is NOT resolved relative // !! to the current dir, and glob.sync() below then fails. // !! When in doubt, resolve with fs.realPathSync() *beforehand*. var fsPathNormalized = path.normalize(fsPath) // OSX: HFS+ stores filenames in NFD (decomposed normal form) Unicode format, // so we must ensure that the input path is in that format first. if (process.platform === 'darwin') fsPathNormalized = fsPathNormalized.normalize('NFD') // !! Windows: Curiously, the drive component mustn't be part of a glob, // !! otherwise glob.sync() will invariably match nothing. // !! Thus, we remove the drive component and instead pass it in as the 'cwd' // !! (working dir.) property below. var pathRoot = path.parse(fsPathNormalized).root var noDrivePath = fsPathNormalized.slice(Math.max(pathRoot.length - 1, 0)) // Perform case-insensitive globbing (on Windows, relative to the drive / // network share) and return the 1st match, if any. // Fortunately, glob() with nocase case-corrects the input even if it is // a *literal* path. return glob.sync(noDrivePath, { nocase: true, cwd: pathRoot })[0] } module.exports = trueCasePathSync
Simpan