Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[help-needed]Can I pull remote files into an empty folder? #13

Closed
ZoeVonFeng opened this issue Jan 11, 2018 · 10 comments
Closed

[help-needed]Can I pull remote files into an empty folder? #13

ZoeVonFeng opened this issue Jan 11, 2018 · 10 comments

Comments

@ZoeVonFeng
Copy link

Description

I am trying to pull remote directory to an empty folder, just as a SFTP does.

Actual behavior

If I asked it to List Directory, it will show everything in the remote directory. However, when I asked it to pull, it would be:
[vscode-deploy-reloaded]::[testing_student4] No files found!

Expected behavior

I was hoping it could pull all the files.

Steps to reproduce

{Please write here, including precondition and an example config, if possible}

Example config

{
  "deploy.reloaded": {
    "packages": [
      {
        "name": "test",
        "description": "Package version 2.3.4",
        "exclude": [
          "tests/**",
          ".vscode/**",
          ".vscode",
          "node_modules/**",
          "app/bower_components/**",
        ],
        "files": [
          "**"
        ],
        // "removeOnChange": [
        //   "student4"
        // ],
        // "deployOnSave": [
        //   "student4"
        // ],
        "syncWhenOpen": "student4"
      }
    ],
    "targets": [
      {
        "type": "sftp",
        "name": "student4",
        "description": "A SFTP folder",
        "dir": "/XXXXXXX",
        "host": "XXXXXX",
        "user": "XXX",
        "privateKey": "XXXXXX",
      }
    ]
  }
}

Your environment

  • Operating system: Linux 17.10
  • Visual Studio Code version: 1.19.2
  • Extension version: 0.28.5
@mkloubert
Copy link
Owner

@ZiyiFeng-SJSU

I have released a new version 0.29.0, which is now able to download files, even if they do not exist in workspace:

demo16

@ZoeVonFeng
Copy link
Author

ZoeVonFeng commented Jan 14, 2018

Thank you for such immediate update!
When I was testing it on the empty folder, it pulled all the folder down but no file, not even files in the parent folder. Both file and sub-folder pulling are having this error:

Pulling files from to '/home/XXX/Dropbox/testing_student4' ...
	Pulling file '/home/zfeng/src/student4/npm-debug.log' ... [ERROR: 'No such file']
	Pulling file '/home/zfeng/src/student4/.yo-rc.json' ... [ERROR: 'No such file']
[Done]

When it pulled the folder, but can't pull files, it has this error message:

Pulling files from 'home/zfeng/src/student4/app' to '/home/XXX/Dropbox/testing_student4/app' ...
[ERROR: 'No such file']

@mkloubert
Copy link
Owner

@ZiyiFeng-SJSU

Can you download these files via another SFTP client with the same settings / credentials?

@ZoeVonFeng
Copy link
Author

ZoeVonFeng commented Jan 16, 2018

Yea. Even your SFTP client pulled perfectly fine when I have files of a leaf- folder pre-existed.

Pulling file '/home/XXX/Dropbox/student4/a.html' from  '/ (student4)' ... [OK]
Pulling file '/home/XXX/Dropbox/student4/b.html' from  '/ (student4)' ... [OK]
Pulling file '/home/XXX/Dropbox/student4/c.html' from  '/ (student4)' ... [OK]

Update: This is error message when I copied the exact settings(using same remote directory), but instead pulling I used download:

Pulling files from to '/home/zoe/Dropbox/testing_student4' ...
	Pulling file '/home/zfeng/src/student4/app/src/a.html' ... [ERROR: 'No such file']
	Pulling file '/home/zfeng/src/student4/app/src/b.html' ... [ERROR: 'No such file']
	Pulling file '/home/zfeng/src/student4/app/src/c.html' ... [ERROR: 'No such file']

@mkloubert
Copy link
Owner

@ZiyiFeng-SJSU

Sorry when I answer so late ... the issue should be fixed with version 0.30.1 now.

The problem was, if I tried to reproduce the issue on my local windows test server, I did not get the error.

After I had the time to install a real linux machine, a similar error was displayed in my output window.

@ZoeVonFeng
Copy link
Author

ZoeVonFeng commented Jan 24, 2018

Np @mkloubert ! Thank you for keep everything updated!
Right now on linux, it finally be able to pull files from the top level folder, it can also pull sub-folder, but it can't pull folder/files within sub-folder.

Pulling files from to '/home/XXX/Dropbox/testing_student4' ...
	Pulling file '/.yo-rc.json' ... [OK]
        ...
	Pulling file '/.gitreview' ... [OK]
[Done]

Error message when trying to pull sub-folder:

Pulling files from 'home/zfeng/src/student4/src' to '/home/XXX/Dropbox/testing_student4/src' ...
[ERROR: 'No such file']

I attached the picture to show the empty folder and the top-level files that were pulled:
image

@mkloubert
Copy link
Owner

@ZiyiFeng-SJSU

Thanks for the quick response!

The issue should be fixed in version 0.30.2 now.

@ZoeVonFeng
Copy link
Author

ZoeVonFeng commented Jan 25, 2018

Niiiiiice! Now it is pulling files!
I am doing a test that asks it pulls more than ten thousands files in a node_modules folder see if it breaks =]
It had an EMFILE error:too many open files once, I am seeing if I can reproduce it.

Update:
It does happened again.
Error message:

Pulling files from 'node_modules/semver-regex' to '/home/XXX/Dropbox/testing_student4/node_modules/semver-regex' ...
[ERROR: 'EMFILE: too many open files, open '/home/XXX/.ssh/id_rsa'']

@ZoeVonFeng
Copy link
Author

Do you want me to open another issue with this error and close the current one?

@mkloubert
Copy link
Owner

@ZiyiFeng-SJSU

Unfortunately, I could not reproduce it.

If it happens again, you should open a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants