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

TRUNK-3934 - adds an fallback for APPLICATION_DATA_DIRECTORY #454

Merged
merged 2 commits into from Jan 28, 2014

Conversation

MrMarvin
Copy link
Contributor

as described in ticket TRUNK-3934: in some deployments using an application server such as Tomcat, we can not write to the current users home dir and instead should use a more generic and/or appropriate path

as described in ticket TRUNK-3934: in some deployments using an application server such as Tomcat, we can not write to the current users home dir and instead should use a more generic and/or appropriate path
@r-friedman
Copy link
Member

Please see my comment on the ticket.

dkayiwa added a commit that referenced this pull request Jan 28, 2014
TRUNK-3934 - adds an fallback for APPLICATION_DATA_DIRECTORY
@dkayiwa dkayiwa merged commit cb7b6ca into openmrs:master Jan 28, 2014
@giangnn
Copy link

giangnn commented Mar 8, 2014

I find that these 2 files in OpenmrsUtil.getApplicationDataDirectory() is problematic:

filepath = System.getProperty("user.home") + File.separator + ".OpenMRS";
if (!(new File(filepath)).canWrite()) {

In my case, I started with a fresh installation, run from jetty and get the same error as in https://answers.openmrs.org/questions/1860/openmrs-manual-install-on-mac-log-in-as-root

The problem is that the folder .OpenMRS is not created yet, so call to canWrite() will always return false. Can we add code to create folder here?

@dkayiwa
Copy link
Member

dkayiwa commented Mar 8, 2014

Can you create a ticket for that?

On Sat, Mar 8, 2014 at 7:28 PM, giangnn notifications@github.com wrote:

I find that these 2 files in OpenmrsUtil.getApplicationDataDirectory() is
problematic:

filepath = System.getProperty("user.home") + File.separator + ".OpenMRS";
if (!(new File(filepath)).canWrite()) {

In my case, I started with a fresh installation, run from jetty and get
the same error as in
https://answers.openmrs.org/questions/1860/openmrs-manual-install-on-mac-log-in-as-root

The problem is that the folder .OpenMRS is not created yet, so call to
canWrite() will always return false. Can we add code to create folder here?

Reply to this email directly or view it on GitHubhttps://github.com//pull/454#issuecomment-37102048
.

If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

RandilaP pushed a commit to RandilaP/openmrs-core that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants