You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functionality getEntry() and removeEntry() (with "location" or "entry" as parameter) doesn't work for '''Windows''' based system and they don't show any error or exceptions either.
The Steps to reproduce,
Create combine archive and add a file as entry to it.
Save and close this combine archive to file system.
Open this existing combine archive.
4 a.Try to access entry ( getEntry() or removeEntry() ) using its relative file path.
4 b. Try to access entry ( getEntry() or removeEntry() ) using valid Archive Entry.
The access to entry is not possible and these methods return failure ("null" in case of getEntry() and "false" for removeEntry()).
The unit test for this issue is added to "TestArchive.java" from CombineArchive codebase locally and patch is attached with the ticket.
The initial analysis suggests that this issue is related with handling File separators during reading and accessing archive for different file systems.
started wotking on win bug [see #25]
spotted the problem: win is a bit incosistent wit paths?
when working with paths from a zipfs i get slashes ('/'), that means
{{{
zipfs.getPath (location).normalize ()
results in something like /path/to/file.
but (almost) every other path will contain backslashes (''), so
Paths.get (about).normalize ()
will give me \path\to\file.
oviously, comparing these two fails...
i already implemented a pathFixer` in the `Utils class which
replaces the os' path seperator with a slash, to make sure we
always work with slashes. that should hopefully be able to fix
that problem. still need to find out where to fix the paths..
}}}
applied the path fixer.. [fixes #25]
that should fix the slash/backslash problem.
had to adjust the test, because the test will
now fail on slash-based-systems.
Trac Ticket #25
component: code
owner: Martin Scharm martin@binfalse.de
reporter: sdeshmukh@mango-solutions.com
created: 2015-03-06 10:32:51
milestone:
type: task
version:
keywords:
CombineArchive v0.9.4.4 :
The functionality getEntry() and removeEntry() (with "location" or "entry" as parameter) doesn't work for '''Windows''' based system and they don't show any error or exceptions either.
The Steps to reproduce,
Create combine archive and add a file as entry to it.
Save and close this combine archive to file system.
Open this existing combine archive.
4 a.Try to access entry ( getEntry() or removeEntry() ) using its relative file path.
4 b. Try to access entry ( getEntry() or removeEntry() ) using valid Archive Entry.
The access to entry is not possible and these methods return failure ("null" in case of getEntry() and "false" for removeEntry()).
The unit test for this issue is added to "TestArchive.java" from CombineArchive codebase locally and patch is attached with the ticket.
The initial analysis suggests that this issue is related with handling File separators during reading and accessing archive for different file systems.
comment 1
time: 2015-03-06 10:33:36
author: sdeshmukh@mango-solutions.com
Updated attachment to TestCombineArchive.patch
comment 2
time: 2015-03-06 10:33:36
author: sdeshmukh@mango-solutions.com
archive unit test patch
comment 3
time: 2015-04-21 10:00:05
author: Martin Scharm martin@binfalse.de
In None:
comment 4
time: 2015-04-22 12:21:33
author: Martin Scharm martin@binfalse.de
In None:
results in something like
/path/to/file
.but (almost) every other path will contain backslashes (''), so
will give me
\path\to\file
.oviously, comparing these two fails...
i already implemented a
pathFixer` in the `Utils
class whichreplaces the os' path seperator with a slash, to make sure we
always work with slashes. that should hopefully be able to fix
that problem. still need to find out where to fix the paths..
}}}
comment 5
time: 2015-04-22 12:21:49
author: Martin Scharm martin@binfalse.de
In None:
comment 6
time: 2015-04-22 12:21:49
author: Martin Scharm martin@binfalse.de
Updated owner to Martin Scharm martin@binfalse.de
comment 7
time: 2015-04-22 12:21:49
author: Martin Scharm martin@binfalse.de
Updated resolution to fixed
comment 8
time: 2015-04-22 12:21:49
author: Martin Scharm martin@binfalse.de
Updated status to closed
The text was updated successfully, but these errors were encountered: