[rfc][icedtea-web] offline support
Jacob Wisor
gitne at gmx.de
Tue Aug 5 10:48:47 UTC 2014
On 08/05/2014 11:02 AM, Jiri Vanek wrote:
> On 08/05/2014 10:38 AM, Jacob Wisor wrote:
>> On 08/05/2014 10:34 AM, Jiri Vanek wrote:
>>> On 08/04/2014 06:03 PM, Jacob Wisor wrote:
>>>> On 08/04/2014 05:34 PM, Jiri Vanek wrote:
>>>>>
>>>>> The leading code was CacheUtil.cleanCache, which is making some complicated
>>>>> decisions whether to delete file. I have not found case when keep all
>>>>> should be
>>>>> usefull. (?????)
>>>>>
>>>>> Does anybody reacll why
>>>>> * FIXME: if cacheDir is for example $USER_HOME and they have a
>>>>> folder called http
>>>>> * and/or https. These would get removed.
>>>>> */
>>>>> remove.add(cacheDir + File.separator + "http");
>>>>> remove.add(cacheDir + File.separator + "https");
>>>>>
>>>>> do exists?
>>>>
>>>> This case has become obsolete since IcedTea-Web's support for XDG. I assume
>>>> this FIXME has been
>>>> added for when XDG is not supported on the target system. So the user may have
>>>> "http" and/or "https"
>>>> sub-directories in their $HOME directory (although improbable but possible).
>>>> As I understand,
>>>> currently these sub-directories get removed unconditionally which may lead to
>>>> unintended loss of
>>>> data for some users, hence the FIXME. So, further code needs to be added to
>>>> selectively and safely
>>>> delete files in those sub-directories on systems which do not support XDG.
>>>>
>>>> Indeed, software should never /delete/ files it has not written itself (except
>>>> for file managers, of
>>>> course), in order to minimize the possibility of losing data unintentionally.
>>>>
>>> Well that more then fair enough. I will remove those lines in this patch for
>>> head.
>>
>> So XDG has become a hard dependency since 1.5, right?
>>
>> Jacob
>
> //I hit send in middle of message:-/
>
>
>
> Well - yes - and no. ITW is following xdg specification, so first i is trying to
> use XDG_{CONFIG,CACHE,RUNTIME}_DIR and if those fails, it fallback to defaults
> - which differs from 1.4
> XDG_CONFIG_DIR - fallback is $HOME/.config/icedtea-web
> XDG_CACHE_DIR - fallback is $HOME/.cache/icedtea-web
> XDG_RUNTIME_DIR fallback is $TMP/hash_user_pid (IIRC)
Well, although it is a strange corner case, nevertheless XDG_CACHE_DIR=$HOME may
still apply ;-)
Jacob
More information about the distro-pkg-dev
mailing list