Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349947

Summary: [scp] with scp IRemoteFile.exist() returns always true
Product: [Tools] Target Management Reporter: Simon Bernard <sbernard>
Component: RSEAssignee: Anna Dushistova <anna.dushistova>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: anna.dushistova, contact
Version: 3.3   
Target Milestone: 3.3.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
a patch for this bug
none
a patch for this bug with copyright header anna.dushistova: iplog+

Description Simon Bernard CLA 2011-06-21 09:44:24 EDT
When I get a IRemoteFile thanks to the ScpFileService, its "exist()" method always returns true. (even if the file does not exist).

It's seems this is a bug in the makeHostFile method of ScpFileService. 
I suppose when the attr paramter is null, this means that the file does not exist.

I attach a patch for this problem
Comment 1 Simon Bernard CLA 2011-06-21 09:57:41 EDT
Created attachment 198339 [details]
a patch for this bug
Comment 2 Anna Dushistova CLA 2011-06-21 11:07:46 EDT
Comment on attachment 198339 [details]
a patch for this bug

iplog flag is only set when a patch is checked in. As for the patch,
please consider modifying the copyright header in the ScpFileService.java. I will also need a legal disclaimer from you (that you developed this code from scratch and are authorized by your employer to contribute it) in a bug comment.
Comment 3 Simon Bernard CLA 2011-07-06 10:30:00 EDT
Created attachment 199186 [details]
a patch for this bug with copyright header

I, Simon Bernard, wrote 100% of the attached code from scratch. I am employed by Sierra Wireless, and my company has signed an Eclipse Member Commiter Agreement
Comment 4 Anna Dushistova CLA 2011-07-07 09:04:35 EDT
Simon, in copyright header I would expect to see a company name(that is "Sierra Wireless") in brackets.
Is there any reason why you put "Contributor" instead?
Is it okay if I change it to "Sierra Wireless"?

(In reply to comment #3)
> Created attachment 199186 [details]
> a patch for this bug with copyright header
> 
> I, Simon Bernard, wrote 100% of the attached code from scratch. I am employed
> by Sierra Wireless, and my company has signed an Eclipse Member Committer
> Agreement
Comment 5 Simon Bernard CLA 2011-07-07 10:24:42 EDT
(In reply to comment #4)
> Simon, in copyright header I would expect to see a company name(that is "Sierra
> Wireless") in brackets.
> Is there any reason why you put "Contributor" instead?
> Is it okay if I change it to "Sierra Wireless"?

My mistake ! it's ok, you can change it.
Comment 6 Anna Dushistova CLA 2011-07-07 10:50:38 EDT
Comment on attachment 199186 [details]
a patch for this bug with copyright header

Applied the patch with the Contributor/Sierra Wireless fix.
Comment 7 Anna Dushistova CLA 2011-07-07 10:51:08 EDT
It is checked in to HEAD.