Robert-W / grunt-ftp-push

Deploy files to an FTP server as part of your Grunt workflow.
MIT License
39 stars 14 forks source link

Extra folders is being created when file provided cwd other than '.' or './ #23

Closed liuyuns closed 9 years ago

liuyuns commented 9 years ago

Assume we want to upload following file

files:[ {expand: true,cwd: 'test/sub',src: ['*/']} ]

and under test/sub we have one file: dummy.txt

The result is following:

  1. dummy.txt --> dest
  2. dest/test/sub, empty folders! we don't want this in my opinion.
Robert-W commented 9 years ago

Hi @liuyuns,

I'll take a look at this over the weekend and try to merge it. Im pretty busy for the next few days with work and school but I would agree, empty folders getting pushed is pointless. Just to make sure I am understanding you.

your local structure looks like this (assuming test is in the root where the Gruntfile is): test test/sub test/sub/dummy.txt

You want something like this: dummy.txt

But your getting this: dummy.txt test (empty directory) test/sub (empty directory)

liuyuns commented 9 years ago

Hi Robert, Thank you for the quick reply, yes, your understanding is exactly right :)

Robert-W commented 9 years ago

Ok great, Ill check it out over the weekend and if everything looks good Ill merge it and add this case to the unit tests which will be my new version. Thanks