Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP path hard coded #60

Open
ian-cameron opened this issue Jun 7, 2019 · 1 comment
Open

FTP path hard coded #60

ian-cameron opened this issue Jun 7, 2019 · 1 comment

Comments

@ian-cameron
Copy link
Contributor

if(!ftpClient.DownloadFile(SignalFtpOptions.LocalDirectory + Signal.SignalID+ @"\" + localFileName, ".."+Signal.ControllerType.FTPDirectory +@"/" + ftpListItem.Name))

This line is prepending ".." to the path. That might be a vendor specific thing so it should be in the FTPDirectory column of ControllerTypes in the database, not hardcoded here. This breaks controllers that don't use a relative path in their configuration.

Fix is remove ".."+ from the line above and it in the database instead.

@ZachParkerCR
Copy link

if(!ftpClient.DownloadFile(SignalFtpOptions.LocalDirectory + Signal.SignalID+ @"\" + localFileName, ".."+Signal.ControllerType.FTPDirectory +@"/" + ftpListItem.Name))

This line is prepending ".." to the path. That might be a vendor specific thing so it should be in the FTPDirectory column of ControllerTypes in the database, not hardcoded here. This breaks controllers that don't use a relative path in their configuration.

Fix is remove ".."+ from the line above and it in the database instead.

@ian-cameron , I'm pretty green when it comes to diagnosing and fixing issues on my end with this system, but I've come across an issue that may be related to your post. Where can I find the SignalFTP.cs file to edit that line of code and remove the ".."? Or is that even possible?

Or would it be a better idea to just create a new line in the ControllerType table and address it there by how I insert the FTPDirectory for that new item?

Would I need to add a subfolder so it backs up one to the correct folder, or again, is that not even possible?

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

No branches or pull requests

2 participants