Page 1 of 1

SFTP Error on save.

Posted: Tue Apr 21, 2015 4:01 am
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

Re: SFTP Error on save.

Posted: Tue Apr 21, 2015 9:17 am
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

Re: SFTP Error on save.

Posted: Wed Apr 22, 2015 2:54 am
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.

Re: SFTP Error on save.

Posted: Wed Apr 22, 2015 10:16 am
by eranif
Thanks for the info.
I have fixed this in git master https://github.com/eranif/codelite/comm ... 3b19e7c4c1
sftp.png
Eran