cloneit icon indicating copy to clipboard operation
cloneit copied to clipboard

Zipping fails with a single file

Open uncenter opened this issue 1 year ago • 3 comments

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.

uncenter avatar Jul 27 '24 20:07 uncenter

Hmm... will have to check this.

alok8bb avatar Jul 28 '24 04:07 alok8bb

Ah, I see. Hard coded in the code actually! https://github.com/alok8bb/cloneit/blob/6198556e810d964cc5938c446ef42fc21b55fe0b/src/file_archiver.rs#L82-L84

uncenter avatar Jul 29 '24 22:07 uncenter

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 https://github.com/alok8bb/cloneit/pull/14#discussion_r1694011651), 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!

uncenter avatar Jul 29 '24 23:07 uncenter