Socket
Socket
Sign inDemoInstall

trash

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trash - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

17

lib/linux.js

@@ -21,2 +21,11 @@ 'use strict';

const pad = number => number < 10 ? '0' + number : number;
const getDeletionDate = date => date.getFullYear() +
'-' + pad(date.getMonth() + 1) +
'-' + pad(date.getDate()) +
'T' + pad(date.getHours()) +
':' + pad(date.getMinutes()) +
':' + pad(date.getSeconds());
const trash = async (filePath, trashPaths) => {

@@ -27,8 +36,6 @@ const name = uuid.v4();

const trashInfoData = `[Trash Info]\nPath=${filePath.replace(/\s/g, '%20')}\nDeletionDate=${(new Date()).toISOString()}`;
const trashInfoData = `[Trash Info]\nPath=${filePath.replace(/\s/g, '%20')}\nDeletionDate=${getDeletionDate(new Date())}`;
await Promise.all([
moveFile(filePath, destination),
writeFile(trashInfoPath, trashInfoData)
]);
await writeFile(trashInfoPath, trashInfoData);
await moveFile(filePath, destination);

@@ -35,0 +42,0 @@ return {

{
"name": "trash",
"version": "7.1.0",
"version": "7.1.1",
"description": "Move files and folders to the trash",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc