darkoperator / darkoperator/Posh-SSH

Test-SFTPPath and Get-SFTPChildItem not seeing directories created after first use.

Open
#307 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.1k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

I have a script that is constantly looping and a part of the loop is to do a test-sftpPath for a specific folder. If that folder exists it triggers an if statement. This works fine the first run through, however, if I create the folder it is checking for while the script is still running it wont show in get-sftpchilditem or test-sftppath until you use the module to update some other file in the directory or start a new sftp session.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the looping Test-SFTPPath and Get-SFTPChildItem scenario in one SFTP session, creating the checked-for directory while the loop runs. Compare directory visibility before and after updating another file or starting a new session; done means newly created directories are detected without either workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.