Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zipping fails with a single file #15

Open
uncenter opened this issue Jul 27, 2024 · 3 comments
Open

Zipping fails with a single file #15

uncenter opened this issue Jul 27, 2024 · 3 comments

Comments

@uncenter
Copy link
Contributor

Running cloneit https://github.com/alok8bb/cloneit/blob/master/install.sh --zip (or cargo run -- https://github.com/alok8bb/cloneit/blob/master/install.sh --zip) fails with a zipping error.

@alok8bb
Copy link
Owner

alok8bb commented Jul 28, 2024

Hmm... will have to check this.

@uncenter
Copy link
Contributor Author

Ah, I see. Hard coded in the code actually!

if !Path::new(&self.m_src_dir).is_dir() {
return Err(ZipError::FileNotFound);
}

@uncenter
Copy link
Contributor Author

uncenter commented Jul 29, 2024

After doing some refactoring (#17) I've come to better understand the codebase. The issue here is that we don't know the files that are being downloaded, and individual files are not downloaded to the source directory (aka we don't even know the file path to potentially add to the zip). I think tracking what files are being downloaded and where, and returning this from the requesting/downloading functions, can unlock a bunch of new functionality; we can log that output to the user (see #14 (comment)), zip the files without using a whole WalkDir instance (perf presumably), etc.

I'll look into how we can do that after finishing up the potential refactors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants