1. node.upload_directory() won’t upload nested folders if they have no contents

node.upload_directory() won’t upload nested folders if they have no contents

Home Forums FABRIC General Questions and Discussion node.upload_directory() won’t upload nested folders if they have no contents

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3847
    Devin Lane
    Participant

      Hi,

      I noticed when running node.upload_directory(), if one of the subfolders in the directory I pass is empty, that folder will not be uploaded. This is needed for the structure of the node’s FS for when I run a python script that will eventually write to that directory. I know there are workarounds (such as including an empty file in the folder or creating the directory before running my python script manually) but I think this should be a feature built in to the function. Could someone help with this?

       

      Thanks!

      #3877
      Paul Ruth
      Keymaster

        This is an effect of the tar command not adding empty folders.   I fixed it in the newest branch and it will be included in an upcoming release.

        Thanks.

        #3887
        Devin Lane
        Participant

          Thanks, I tested it and it works well 👍

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘node.upload_directory() won’t upload nested folders if they have no contents’ is closed to new replies.
        FABRIC invites nominations for four awards recognizing innovative uses of FABRIC resources—Best Published Paper, Best FABRIC Matrix, Best FABRIC Experiment, and Best Classroom Use of FABRIC — submissions due by **Monday, February 24 at 11:59 PM ET**, and winners announced at KNIT10. [>>>Submit Form](https://docs.google.com/forms/d/e/1FAIpQLSeTp3i2iDhB7bHgN8ryMxZci8ya87yjeQd7_JMZImUodNinVA/viewform)

        KNIT10 Call for Demos Now Open! Submit your demo by **February 24**. [>>>Submit Demo](https://docs.google.com/forms/d/e/1FAIpQLScRIWqHliNP3DFWBCnalYN_fBXJXVM0PpP9YWWJdSebC95TvA/viewform)
        FABRIC invites nominations for four awards recognizing innovative uses of FABRIC resources—Best Published Paper, Best FABRIC Matrix, Best FABRIC Experiment, and Best Classroom Use of FABRIC — submissions due by **Monday, February 24 at 11:59 PM ET**, and winners announced at KNIT10. [>>>Submit Form](https://docs.google.com/forms/d/e/1FAIpQLSeTp3i2iDhB7bHgN8ryMxZci8ya87yjeQd7_JMZImUodNinVA/viewform)

        KNIT10 Call for Demos Now Open! Submit your demo by **February 24**. [>>>Submit Demo](https://docs.google.com/forms/d/e/1FAIpQLScRIWqHliNP3DFWBCnalYN_fBXJXVM0PpP9YWWJdSebC95TvA/viewform)