Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327525 - TCFFileSubSystemConfiguration should set file system is unix style
Summary: TCFFileSubSystemConfiguration should set file system is unix style
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.4.0   Edit
Assignee: Anna Dushistova CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 04:37 EDT by Liping Ke CLA
Modified: 2013-06-05 07:56 EDT (History)
5 users (show)

See Also:


Attachments
change default file type (unix style or not) (2.52 KB, patch)
2010-10-25 23:27 EDT, Liping Ke CLA
no flags Details | Diff
change default file type (unix or not) implementation (3.61 KB, patch)
2010-11-01 21:39 EDT, Liping Ke CLA
anna.dushistova: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Liping Ke CLA 2010-10-12 04:37:58 EDT
Build Identifier: r1178

TCFFileSubSystemConfiguration did not set the file system is unix style. It will cause problems. The filter string is wrong ("*\\.") [correct string should be ("*/.")]. For example, if you new a folder under Files->Home, it will report a warning bug "New resource will not be visible due to subsetting. Create it anyway". 
Since the filter string is wrong, it might cause some other problems too.
The fix is straight-forward. I will submit the patch after this bug is confirmed.

Reproducible: Always

Steps to Reproduce:
1. new a TCF connection
2. under TCF-connection->Files->Home, new a folder
3. warning box show "New resource will not be visible due to subsetting. Create it anyway". If you create any way, the folder can't be seen.
Comment 1 Liping Ke CLA 2010-10-12 04:58:08 EDT
cc Anna.
Comment 2 Anna Dushistova CLA 2010-10-13 15:48:45 EDT
What if TCF agent is running on Windows?
Eugene, we do support it, aren't we?
Comment 3 Eugene Tarassov CLA 2010-10-13 16:04:22 EDT
(In reply to comment #2)
> What if TCF agent is running on Windows?
> Eugene, we do support it, aren't we?

Yes, we do support TCF agent on Windows.
However, TCF protocol requires forward slashes in file names regardless of OS.
In fact, file name syntax in the protocol is OS independent - it is nether Windows nor Unix syntax. The syntax is same as in sftp protocol, so if RSE supports sftp, I would expect TCF file subsystem code to be similar to that one.
Comment 4 Liping Ke CLA 2010-10-13 20:27:52 EDT
Yes I remember I saw somewhere, it will detect which OS now is running and then set the correct style.
I will send the patch soon after we finish current release cycle.

Thanks& Regards,
criping
Comment 5 Liping Ke CLA 2010-10-20 03:36:37 EDT

Hi, Anna and Eugene
I just checked most of other file subsystemcode, such as ftp, sftp, dstore, it will directly setIsUnixStyle(true) or setIsUnixStyle(false).
But for local, since it can detect host os directly, it will detect whether it is windows.

If we don't set the style, the main problem is the filefilters are wrong, so filter functionality does not work well.

I am thinking it's impossible to detect target os before connection, maybe we can add another connection attributes so that end user could fill it (together with command prompt char). By default we can set it to be unix style(true).

How do you think?

Thanks& Regards,
criping
Comment 6 Liping Ke CLA 2010-10-20 04:21:02 EDT
> I am thinking it's impossible to detect target os before connection, maybe we
> can add another connection attributes so that end user could fill it (together
> with command prompt char). By default we can set it to be unix style(true).
> 

A correction to this. I found the createDefaultFilterPool is called even before create connector service, so we can't use connector service attributes either. So I can't think of a good place to pre-set unix/windows style right now...

Any suggestion here?

Thanks& Regards,
criping
Comment 7 Liping Ke CLA 2010-10-25 23:06:40 EDT
Hi, Anna

Connection creation need host info, yet host creation need subsystem info. So TCFFileSybSystemConfiguration.createDefaultFilterPool will be called before TCF connection setup. So according to current RSE logic, the only way we can setup the unix/window style point is the subsystem creation time.
Since it only affects RSE view folder browser content, it is not a big problem.  I noticed there's variables in tcf.rse.Messages.properties(PROCESS_VMSIZE_VALUE), so could we also create a windows/unix style var in the file too? We can preset it as unix. (I know it will cause trouble for windows users, since we will not provide windows/linux two versions downloading).But anyway, I guess unix style user number will exceed windows style number?
Any other suggestions?

Thanks& Regards,
criping
Comment 8 Liping Ke CLA 2010-10-25 23:27:29 EDT
Created attachment 181688 [details]
change default file type (unix style or not)

Hi, Anna and all
This is a only a rough patch for your review. If the idea agreed, i will make a formal patch adding lic modifications.

Thanks& Regards,
criping
Comment 9 Anna Dushistova CLA 2010-11-01 06:45:51 EDT
Idea seems fine with me (at least what I could understand from the patch :) ).

(In reply to comment #8)
> Created an attachment (id=181688) [details]
> change default file type (unix style or not)
> 
> Hi, Anna and all
> This is a only a rough patch for your review. If the idea agreed, i will make a
> formal patch adding lic modifications.
> 
> Thanks& Regards,
> criping
Comment 10 Liping Ke CLA 2010-11-01 21:39:01 EDT
Created attachment 182186 [details]
change default file type (unix or not) implementation

Hi, Anna

I modified the patch for adding lic header. And also I have tested under Linux/Ubuntu10.04. Now the Files->Home filters are correct.

Thanks& Regards,
criping
Comment 11 Anna Dushistova CLA 2010-11-02 05:41:10 EDT
On my OpenSuse 11.2 machine Files->Home is correct without the patch and with the patch it shows the / content.
Comment 12 Liping Ke CLA 2010-11-02 20:59:25 EDT
Hi,Anna

Have you tried to remove all RSE related hidden contents ( including .metadata folder and RemoteSystemsTempFiles) under runtime-EclipseApplication?

If the data is there, it will not call createfilters, so will not call isUnixStyle function. It will reload old already created filters. 

Each time when testing (apply and un-apply), I will remove runtime-EclipseApplication folder for convenience.

Can you double confirm that? I also installed a new open-suse for testing. I will try to find time to reproduce the problem too.

Thanks& Regards,
criping


(In reply to comment #11)
> On my OpenSuse 11.2 machine Files->Home is correct without the patch and with
> the patch it shows the / content.
Comment 13 Anna Dushistova CLA 2010-11-03 03:56:59 EDT
(In reply to comment #12)
> Hi,Anna
> 
> Have you tried to remove all RSE related hidden contents ( including .metadata
> folder and RemoteSystemsTempFiles) under runtime-EclipseApplication?
> 
> If the data is there, it will not call createfilters, so will not call
> isUnixStyle function. It will reload old already created filters. 

Now it works.
Comment 14 Anna Dushistova CLA 2010-11-03 04:04:34 EDT
Patch is checked in, thanks!
Comment 15 Doug Schaefer CLA 2011-05-17 10:49:43 EDT
Moving bugs to new home for IP log.
Comment 16 Martin Oberhuber CLA 2013-06-05 06:27:14 EDT
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3