Fix the up value to match the tree depth of the source file#131
Conversation
|
@JensLuyten, can you write a test for this? |
|
@MartijnCuppens, I have added a test for this copy use-case. |
|
@JensLuyten, these tests can be combined with the existing I've also added some additional tests which show this is still not fixing every case (especially when globbing is used). |
|
I've refactored the copy command to be able to work with globbed src definitions. It will now copy files per path rather than per defined location. Only concern with that one may be performance, but not sure how much it will be affected. |
|
I've moved the logging to a separate function which is a bit clearer.
I don't think this will affect performance much. |
|
Yeah fine, looks a lot cleaner now indeed. :) |
When copying files from a source folder into your theme folder structure, the copy command also copied the parent folders the source file was in. This occurs since v0.4.0 of Buildozer.
Example:
copy:- src: node_modules/bootstrap/dist/js/bootstrap.min.jsdest: source/scripts/allresulted in the following folder structure:
source/scripts/all/node_modules/bootstrap/dist/js/bootstrap.min.jsBy setting the
upvalue to the length of the src path minus 1, only the file is copied into the folder declared in the dest argument of the copy settings. This change will put the file insource/scripts/all/bootstrap.min.js.