Giter Club home page Giter Club logo

Comments (7)

dabutvin avatar dabutvin commented on June 7, 2024 12

FWIW I had success working around this using a filter

decompress(source, destination, {
  filter: file => !file.path.endsWith('/')
})

from decompress.

ahkohd avatar ahkohd commented on June 7, 2024 2

FWIW I had success working around this using a filter

decompress(source, destination, {
  filter: file => !file.path.endsWith('/')
})

Worked like a charm, thanks!

from decompress.

LichKing-2234 avatar LichKing-2234 commented on June 7, 2024 1

In my case, the file path does not end with '/'. But the data is empty. So the filter can be optimized:

const path = require('path');
...
filter: (file) => {
      return (
        file.type !== 'directory' &&
        !file.path.endsWith(path.sep) &&
        file.data.length !== 0
      );
    },

from decompress.

vislamov avatar vislamov commented on June 7, 2024

Same here, switching to another lib...

from decompress.

hzqst avatar hzqst commented on June 7, 2024

Same issue, switching to another lib tooooo...

from decompress.

jeffmcaffer avatar jeffmcaffer commented on June 7, 2024

Same here. This is preventing temporarily unzip'd folders from being deleted (they are not empty) because the files in them are left open. fs.unlink marks them for deletion but does not empty the folder entry.

Moved to https://www.npmjs.com/package/extract-zip and that seems to work.

from decompress.

stheine avatar stheine commented on June 7, 2024

The error is described in the module that's used for unzip: kevva/decompress-unzip#12

from decompress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.