cozy / ACH

Import/Export data from your Cozy
4 stars 5 forks source link

Directory structure in Cozy doesn't follow source directory structure after importDir #84

Closed drazik closed 3 years ago

drazik commented 3 years ago

:wave:

For my music app, I'm trying to setup some fixtures so that when I screw up everything, I can mount a new instance easily. The first thing I am trying to do is to import some files.

For that, I created the following structure in my app directory:

.
└── fixtures
    └── files
        └── music
            └── Bensound
                └── 01-dreams.mp3

Then I run this command: ACH importDir ./fixtures/files. I expected to get the following structure in my instance's drive:

/
└── music
    └── Bensound
        └── 01-dreams.mp3

Instead I got this:

/
└── 7cead003c76906b2bf1b3b8a66003afe
    └── 01-dreams.mp3
└── music
    └── Bensound

I don't know if what I'm expecting is what the imported structure should be (in which case there's a bug that I'm willing to try to solve) or if what I'm expecting is not what importDir is intended to produce.

ptbrowne commented 3 years ago

I do not use this command and I don't think anyone uses it right now. Your expectation seem fair, and the current result seems weird. It looks like the "Bensound" directory is created and then there is a mixup and we use its id (?) as a name for a new folder.

in which case there's a bug that I'm willing to try to solve

Go for it 👍 Thanks 💯