GithubHelp home page GithubHelp logo

Comments (4)

PhantomGamers avatar PhantomGamers commented on May 30, 2024 2

In my opinion the current behavior generally makes sense, with / indicating that you want the folder itself being included, but I'll just fork this and fix that issue myself then if this feature is not in the scope of this project.

from download-directory.github.io.

fregante avatar fregante commented on May 30, 2024 1

Heh, this is undefined behavior. The fact that it behaves differently is a bug: both URLs point to the same resource and should produce the same output. In both cases the result should be the one I showed earlier.

Changing the zip’s structure is out of scope as the zip is just the current vessel to “download a directory” and may change at any time. See for example #94

from download-directory.github.io.

fregante avatar fregante commented on May 30, 2024

I don’t remember this being an issue, are you on Windows?

This works correctly on iOS, the ZIP file seems to contain the raw contents of the folder, 5 files:

from download-directory.github.io.

PhantomGamers avatar PhantomGamers commented on May 30, 2024

I don’t remember this being an issue, are you on Windows?

Yes, I'm on Windows 11 and the issue happens on both Firefox and Edge.

This works correctly on iOS, the ZIP file seems to contain the raw contents of the folder, 5 files:

* [download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Frefined-github%2Frefined-github%2Ftree%2Fmain%2Fsource%2Fgithub-events](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Frefined-github%2Frefined-github%2Ftree%2Fmain%2Fsource%2Fgithub-events)

Yes, if I just put the folder link directly it has that behavior, but I do want the folder itself to be in the root of the zip file so I append / to the url.

For example:

https://download-directory.github.io/?url=https://github.com/AikoMidori/SteamSkins/tree/main/Metro produces a zip file that contains all of the files in the Metro folder in the root of the zip

https://download-directory.github.io/?url=https://github.com/AikoMidori/SteamSkins/tree/main/Metro/ produces a zip file that contains a Metro folder that then contains all of the files.

However https://download-directory.github.io/?url=https://github.com/AikoMidori/SteamSkins/tree/main/Metro/Metro-JS/ produces a zip file that contains Metro/Metro-JS

Also the same behavior applies to the repo you linked, with https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Frefined-github%2Frefined-github%2Ftree%2Fmain%2Fsource%2Fgithub-events/ containing source/github-events/*files*

from download-directory.github.io.

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.