[MAGNOLIA-1291] Using Windows paths in magnolia.repositories.home property of magnolia.properties mangles the repository Created: 28/Dec/06  Updated: 23/Jan/13  Resolved: 10/Dec/07

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 3.0.1
Fix Version/s: 3.5

Type: Bug Priority: Major
Reporter: zam6ak Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia Enterprise 3.0.1
JBoss 4.0.4


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

In magnolia.properties file
...
...
magnolia.repositories.home=C:\webapp\data\magnolia-author\repositories
...
...
Above path does not report error at bootstraping and repository is created but in some odd directory (application server's working directory, I believe).
In my case repository was created in <jboss-install-dir>/bin/ebappatadmagnolia-autorrepositories/magnolia directory....Weird!!!!
There should be either path checking or error reporting in the logs in this case.....

Changing all to forward slashes fixes the problem....



 Comments   
Comment by David Smith [ 29/Dec/06 ]

See the store method of java.util.Properties in your JVM javadocs. The \ character needs to be escaped with another \ character. The result is:

magnolia.repositories.home=C:\\webapp\\data\\magnolia-author
repositories

Comment by zam6ak [ 29/Dec/06 ]

I agree, but non Java developers may not be aware of this.
Putting a # comment in the file with a note would suffice...

Comment by Philipp Bracher [ 09/Jan/07 ]

Better we handle it savely, than only dropping a note.

Comment by zam6ak [ 09/Jan/07 ]

I also believe that handling paths in code would be the best solution. The comment fix would be the quick solution obviously, although not the best one...

Comment by Magnolia International [ 28/Jun/07 ]

afaik, handling this in code would only be possible if you would rewrite the properties loading mechanism, which you probably don't want to do

Comment by zam6ak [ 28/Jun/07 ]

I think this issue can be closed but I would put in som # in the props file to make developers aware.

Comment by Magnolia International [ 22/Nov/07 ]

Will check this for RC2 - if no change required, will reset "fix version" to RC1.

Comment by Magnolia International [ 10/Dec/07 ]

added warning.

Generated at Mon Feb 12 03:25:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.