[jira] [Commented] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17099956#comment-17099956
 ] 

Jukka Matilainen commented on FOP-2857:
---

I have the same problem.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead the expected  {{new 
File("/tmp/.fop/fop-fonts.cache").}}

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory..

 

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2019-04-11 Thread simon steiner (JIRA)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16815336#comment-16815336
 ] 

simon steiner commented on FOP-2857:


Its not really a long term solution for any changes to be made on fop side 
rather than client side, can you report the issue to them

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2019-04-11 Thread Vera Straube (JIRA)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16815333#comment-16815333
 ] 

Vera Straube commented on FOP-2857:
---

sorry, we don´t develop the webapp. An external supplier does the job and has 
the control over the source code.
we have only read access to the source code to analyse and report errors.

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)