Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349947 - [scp] with scp IRemoteFile.exist() returns always true
Summary: [scp] with scp IRemoteFile.exist() returns always true
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.1   Edit
Assignee: Anna Dushistova CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 09:44 EDT by Simon Bernard CLA
Modified: 2011-07-07 10:51 EDT (History)
2 users (show)

See Also:


Attachments
a patch for this bug (1.22 KB, patch)
2011-06-21 09:57 EDT, Simon Bernard CLA
no flags Details | Diff
a patch for this bug with copyright header (1.76 KB, patch)
2011-07-06 10:30 EDT, Simon Bernard CLA
anna.dushistova: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.