Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#627 closed defect (fixed)

I2Psnark data dir on windows dependent on startup method

Reported by: Eche|on Owned by: zzz
Priority: blocker Milestone: 0.9
Component: apps/i2psnark Version: 0.8.13
Keywords: windows i2psnark path Cc:
Parent Tickets: Sensitive: no

Description

Hi!

A user reported:
i2psnark data directory is different if you startup I2P on windows restartable and no-window.
I tested it and thats true:

fresh install and run with "no window mode" it is C:\ProgramData?\Application Data\i2p\i2psnark

and in fresh install, restartable mode it is C:\Program Files\i2p\i2psnark

This does confuise people on windows and they will not find their torrent data.

echelon

Subtickets

Change History (8)

comment:1 Changed 7 years ago by zzz

Priority: majorblocker
Status: newaccepted

hmm. this may be a symptom of a bigger problem with directory detection and setting, so will definitely need to look into this before 0.9.

comment:2 Changed 7 years ago by zzz

I2P and windows versions please

comment:3 Changed 7 years ago by killyourtv

IIRC from IRC it was Windows 7 and I2P 0.8.13-25 (using the wrapper it goes to the expected place but using the I2P.exe binary (created with izpack magic) it goes to the install directory).

I'll try to reproduce in Win7 and XP (when I'm next at a Win box/vm)

comment:4 Changed 7 years ago by killyourtv

OK, I was able to test this sooner than I thought I'd be able to.

One can see the same behaviour in Windows XP and Windows 7 using I2P 0.8.13-27.

In short:
Start I2P with wrapper: Snark data is saved to %APPDATA%\I2P\I2PSnark
Start I2P without the wrapper: Snark data is saved to the installation directory %PROGRAMFILES%\I2P\I2PSnark

Only I2PSnark seems to be affected. That is, I2P still reads the configuration data from %APPDATA%\I2P regardless of how I2P was started.

comment:5 Changed 7 years ago by killyourtv

Component: router/wrapperapps/i2psnark

Changing component to apps/i2psnark since it's not a problem with the wrapper itself.

comment:6 Changed 7 years ago by zzz

Summary: different I2Psnar data dir on windows dependent on startup methodI2Psnark data dir on windows dependent on startup method

Confirmed here on XP. The i2psnark webapp can't find the static global context due to class loader differences and so is creating a second context. What's going on with the classpath / class loader???

comment:7 Changed 7 years ago by zzz

Resolution: fixed
Status: acceptedclosed

Fixed in 0.8.13-28.

Classpath for Windows no-window is set differently than for everything else, by the launchi2p.jar manifest in build.xml. This isn't in the classloader classpath list so WebAppConfiguration? added it again, causing a new classloader and thus a dup static.

launchi2p.jar classpath updated which fixes new installs. routerconsole.jar classpath updated which fixes existing installs. i2psnark and susidns classpath hack removed from WebAppConfiguration?.

We may want to add an explicit classpath to the command line via i2pstandalone.xml. But that may not work if i2p.exe is run from the command line with an explicit path from another directory?

comment:8 Changed 7 years ago by killyourtv

Confirmed fixed in Windows 7.

Note: See TracTickets for help on using tickets.