Coder Social home page Coder Social logo

Comments (7)

fadden avatar fadden commented on August 11, 2024 1

I've been able to reproduce an issue. It appears that a file with nothing but zeroes can be represented as fully sparse, but a file that starts with zeroes and then has some nonzero values must have an explicitly-allocated block 0, or you can get failures. So far I've only seen them happen when the file is > 128KB (the transition from "sapling" to "tree" structure). I suspect the problem is that there must be at least one block allocated in the first 128KB, so that the first block in the tree's master block list is allocated.

from ciderpress.

fadden avatar fadden commented on August 11, 2024

I've seen Copy ][+ fail on such files (see issue #15), but I was not aware that the ProDOS FST had issues. What version of GS/OS are you using? Can you attach a disk image with a file that fails?

from ciderpress.

fadden avatar fadden commented on August 11, 2024

A ran some tests. A file with 1024 zeroes stored in a ShrinkIt archive occupies 3 blocks when extracted by P8 ShrinkIt, but only 1 block when extracted by GS/ShrinkIt, and 1 block when created by CiderPress. Looking at the directory entry, GS/OS set the storage type to 5 (forked) for all files, while P8 set it to 2. P8 ShrinkIt is able to "type" files extracted by either (it just can't open resource forks).

So both GS/OS and P8 are able to handle files with an initial sparse block. I'm not sure why you're seeing failures / corruption.

from ciderpress.

ibrumby avatar ibrumby commented on August 11, 2024

Glad you have been able to reproduce it. I noticed it on a tree, but another person on the Slack has seen it on a 34 KB file (i.e. sapling).

from ciderpress.

fadden avatar fadden commented on August 11, 2024

This should fix the issue: https://github.com/fadden/ciderpress/releases/tag/v4.1.0-d3

I'm always nervous messing with the filesystem stuff, but I threw a bunch of tests at it and nothing seemed to break. Let me know if it does the trick.

from ciderpress.

ibrumby avatar ibrumby commented on August 11, 2024

That's fixed it! Thanks a lot!

from ciderpress.

polluks avatar polluks commented on August 11, 2024

@fadden Indeed, good unit tests are your friend.

from ciderpress.

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.