Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

castor

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

castor - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

package.json
{
"name": "castor",
"version": "1.1.3",
"version": "1.1.4",
"description": "An ES7 [CAS designed](https://en.wikipedia.org/wiki/Content-addressable_storage) file storage for nodejs with a simple API and robust implementation.",

@@ -5,0 +5,0 @@ "main": "store.js",

@@ -33,4 +33,4 @@ 'use strict';

const MD5_EMPTY_FILE = 'd41d8cd98f00b204e9800998ecf8427e';
class Store {

@@ -128,5 +128,11 @@

var file_path = this.getFilePathFromMd5(file_md5);
if(fs.existsSync(file_path))
return false;
try {
const {size} = fs.statSync(file_path);
if(size == 0 && file_md5 != MD5_EMPTY_FILE)
fs.unlinkSync(file_path);
else
return false;
} catch(err) {}
mkdirpSync(path.dirname(file_path));

@@ -133,0 +139,0 @@ var tmp_path = `${file_path}.tmp.${guid()}`;

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