Skip to content

Commit

Permalink
Fix errors that happen on Windows when using PUT command (#827)
Browse files Browse the repository at this point in the history
* Used path.basename in a place where a slash was used to obtain the name of a file from a path (the slash does not work well in Windows).
* Updated glob from v9 to v10.
  • Loading branch information
Luis Alonso Montero Marín authored Apr 22, 2024
1 parent a2d4814 commit 961a13f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/file_transfer_agent/file_transfer_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ function FileTransferAgent(context) {

const fileInfo = fs.statSync(matchingFileName);
const currFileObj = {};
currFileObj['srcFileName'] = matchingFileName.substring(matchingFileName.lastIndexOf('/') + 1);
currFileObj['srcFileName'] = path.basename(matchingFileName);
currFileObj['srcFilePath'] = matchingFileName;
currFileObj['srcFileSize'] = fileInfo.size;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"fast-xml-parser": "^4.2.5",
"fastest-levenshtein": "^1.0.16",
"generic-pool": "^3.8.2",
"glob": "^9.0.0",
"glob": "^10.0.0",
"https-proxy-agent": "^7.0.2",
"jsonwebtoken": "^9.0.0",
"mime-types": "^2.1.29",
Expand Down

0 comments on commit 961a13f

Please sign in to comment.