SFTP Error on save.

CodeLite installation/troubleshooting forum
Chrisw01
CodeLite Curious
Posts: 2
Joined: Tue Apr 21, 2015 3:46 am
Genuine User: Yes
IDE Question: C++
Contact:

SFTP Error on save.

Post by Chrisw01 »

Hello, first time user but I like what I see so far, however I had an issue when I tried to save a file to a remote server I received an error of this, "Mkpath: path must be absolute" a quick search of Google lead me to your github page where I found the following code.

Code: Select all

if(!tmpPath.StartsWith("/")) {
         throw clException("Mkpath: path must be absolute");
     }

The problem with my setup was for the that I put in public_html/ instead of /home/user/public_html for the default folder causing the exception to be thrown. I don't know that I would actually call this a critical bug or not however if SFTP is wanting an absolute path then the configuration box should make you enter one.

Thanks


Chris
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: SFTP Error on save.

Post by eranif »

Hi Chris,
Can you describe the workflow? you mentioned:
if SFTP is wanting an absolute path then the configuration box should make you enter one
Which one?

Eran
Make sure you have read the HOW TO POST thread
Chrisw01
CodeLite Curious
Posts: 2
Joined: Tue Apr 21, 2015 3:46 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: SFTP Error on save.

Post by Chrisw01 »

eranif wrote:Hi Chris,
Can you describe the workflow? you mentioned:
if SFTP is wanting an absolute path then the configuration box should make you enter one
Which one?

Eran
Hi, sure, would love to.

I created a new SFTP connection to my server and at first I put ~/public_html/ in the Default Folder box but that failed the connection test so I thought since when you log into a secure shell you're dumped into your home directory so I put in the Default Folder box public_html/ which passed the connection test and also downloaded the folder tree like it was supposed to, however since your code is checking for a beginning '/' when I attempted to save my changes to my server I received that error. I've since then have placed /home/user/public_html/ in the default box and all is working better now.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: SFTP Error on save.

Post by eranif »

Thanks for the info.
I have fixed this in git master https://github.com/eranif/codelite/comm ... 3b19e7c4c1
sftp.png
Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
Post Reply