Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUtil.buildPath() on Unix platform #667

Closed
mullar opened this issue Mar 6, 2015 · 10 comments
Closed

FileUtil.buildPath() on Unix platform #667

mullar opened this issue Mar 6, 2015 · 10 comments
Milestone

Comments

@mullar
Copy link

mullar commented Mar 6, 2015

Hi,

It looks like this method was modified which is no longer behaving the way it used in release 20140901.
Before this release it used to return the path for example {"opt","myfolder"} as "/opt/myfolder", due to the later to change to this method it is now returns relative path "opt/myfolder". This method is used by UpdaterImplementation that writes resource files on start up. It appears that now root-path set with -d command line parameter no longer consistently used since update uses it as relative path while other parts of the system using it as absolute path, In Windows because we specify drive letter this is not an issue. What was the reason for the change in behavior? Feels to me this should be fixed.

Thank You

@amolenaar
Copy link
Collaborator

I checked out that bit of code. It feels like there's some unnecessary processing going on there.

@mullar
Copy link
Author

mullar commented Mar 13, 2015

Should the method be fixed to previous behavior? I feel that the way it is now is not consistent across platforms.

@amolenaar
Copy link
Collaborator

I’m diving into that. It seems to me it can be made more consistent with less code.

On 13 Mar 2015, at 11:38, mullar notifications@github.com wrote:

Should the method be fixed to previous behavior? I feel that the way it is now is not consistent across platforms.


Reply to this email directly or view it on GitHub #667 (comment).

@amolenaar
Copy link
Collaborator

I removed FileUtil.buildPath() (98f2e1e). It seems to work fine now on both Mac and Windows.

@amolenaar amolenaar added this to the Next release milestone Mar 15, 2015
@mullar
Copy link
Author

mullar commented Mar 15, 2015

Great!!!. We see will have the next release?

Thanks

@amolenaar
Copy link
Collaborator

Have you checked it for yourself? :) Just to be sure I did not miss anything...

@mullar
Copy link
Author

mullar commented Mar 15, 2015

Looks good. BTW is there any way we can add custom list of resources to be added/replaced on fitnesse startup/install? It appears not. We repackage fitnesse with custom fixtures and would like to add help wiki with it such that it installs out of the box shipped list of wiki plus custom list that we make available in jar. At the moment as workaround we replace shipped lists with our own by adding it in front of fitnesse jar.

Thanks

@amolenaar
Copy link
Collaborator

Hi,

You can append files to the file Resources/updateList or Resources/updateDoNotCopyOverList if you do not want them to be overridden if they already exist. Those files will be extracted on start and when a version has been updated (META-INF/FitNesseVersion.txt).

... but you figured that out already ...

I had a discussion with @fhoeben on the subject as well. Maybe the updater should not just check those files, but check for all occurrences of those files across jar files (Java has API calls for that). That way every plugin can add it's own documentation and have it published.

@mullar
Copy link
Author

mullar commented Mar 15, 2015

Yes that's what we did. Handling all found occurrences sounds like the best option.

@amolenaar
Copy link
Collaborator

I opened issue #685 for dealing with the documentation. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants