← Back to team overview

zim-wiki team mailing list archive

Re: Problem starting Zim with a Shared notebook

 

Currently we use the %XDG_CACHE_DIR% parameter for this. If not set zim
first checks the registry key
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders\Cache".
If this key is also not found it falls back to %TMP%.

So instead of overruling %TMP% you can set %XDG_CACHE_DIR% instead.

Now the question is if the %TMP% fallback makes sense - looking at other
applications maybe it should be in %APPDATA% ?

Any standard on the cache location for apps on windows other than that
registry key ?

-- Jaap



On Thu, Apr 3, 2014 at 10:00 PM, Brendan Kidwell <snarf@xxxxxxxxx> wrote:

> Hi all,
>
> I've been having this problem for a while. Maybe since the Zim 0.60
> release, maybe longer.
>
> All my long-lasting notebooks have the Shared property set to True,
> because I sync them via SparkleShare (formerly Dropbox) and I don't want
> to sync the extra binary files Zim keeps for indexing.
>
> In Windows, Zim creates these binary files in "%TEMP%", while in Linux,
> they are created in "~/cache/zim".
>
> Problem 1) When I open/create a Shared notebook for which the "cache"
> files don't exist, Zim opens a tiny window with the titlebar "zim" or
> "zim.exe" (depending on platform). The window should be bigger and it's
> supposed to have the notebook title in the titlebar. See screenshot:
> http://i.imgur.com/FtEwVAx.png
>
> Problem 2) Problem 1 occurs after EVERY desktop login in Windows,
> because "%TEMP%" gets cleared by the system when I log out.
>
> Am I doing something wrong, or is this a bug?
>
> For now, my workaround (in Windows) is to launch Zim with this script
> that reassigns "%TEMP%" to a private folder which is never cleared out
> by the system:
>
> ---- BEGIN zim-launcher.vbs
> Dim Shell, Env, Args, Arg, ArgsStr
>
> Set Shell = WScript.CreateObject("WScript.Shell")
> Set Env = Shell.Environment("PROCESS")
>
> Env("TEMP") = "C:\Work\AppData\ZimCache"
> Env("TMP") = "C:\Work\AppData\ZimCache"
>
> Set Args = WScript.Arguments
>
> ArgsStr = """C:\Program Files (x86)\Zim Desktop Wiki\zim.exe"" "
> For Each Arg In Args
>         If InStr(Arg, " ") > 0 Then
>                 ArgsStr = ArgsStr & """" & Arg & """ "
>         Else
>                 ArgsStr = ArgsStr & Arg & " "
>         End If
> Next
>
> Shell.Run(Trim(ArgsStr))
> ---- END
>
>
> Brendan Kidwell
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>

References