I would suggest: We will use "/" and replace the "\" in the path on windows machines in the future when we create the ZIP.
And we could include a little hook in the BackupImport file that does a check in the ZIP file of there is any "\" in the path. If yes, we repack the ZIP with "/" in the path as File.seperator and continue the import with that ZIP file. What do you think? Sebastian 2013/2/10 seba.wag...@gmail.com <seba.wag...@gmail.com> > I think our issue is the same as described here: > > http://stackoverflow.com/questions/2549766/create-zip-file-in-windows-and-extract-zip-file-in-linux > > When you unpack the file you can see that the delimiter between files and > folders is "\" > as this is the local File.separator on windows. > Linux and OSx will not understand that this is a directory. > > On windows in Line 571 at BackupExport we are using "getCanonicalPath", I > guess this would return the path with "\" inside of it. > Its a shame that java.io.File doesn't care if the delimiter is "/" or "\" > while java.util.zip does. > That is shitty :( > > Sebastian > > > 2013/2/10 seba.wag...@gmail.com <seba.wag...@gmail.com> > > Well I guess the error or issue must be in those two methods: >> public void writeZipFile(File directoryToZip, List<File> fileList, >> FileOutputStream fos) { >> ..... >> } >> >> public void addToZip(File directoryToZip, File file, ZipOutputStream >> zos) >> throws FileNotFoundException, IOException { >> ..... >> } >> >> That write the ZIP file. Those must contain something platform specific. >> Or the java.util.zip.* has a platform dependent bug. >> >> Sebastian >> >> >> 2013/2/10 Maxim Solodovnik <solomax...@gmail.com> >> >>> I'm going to investigate this (and maybe simplify file import code) >>> >>> >>> On Sun, Feb 10, 2013 at 9:59 AM, Maxim Solodovnik <solomax...@gmail.com >>> >wrote: >>> >>> > It was created by OM on windows >>> > It is opened correctly under Windows >>> > It is imported correctly under Windows (Windows XP if I'm not mistaken) >>> > >>> > Files downloaded from svn are imported flawlwssly on my Windows 7 >>> machine >>> > :( >>> > >>> > but fails under my Ubuntu >>> > >>> > >>> > On Sun, Feb 10, 2013 at 9:51 AM, seba.wag...@gmail.com < >>> > seba.wag...@gmail.com> wrote: >>> > >>> >> yes that is what I meant. >>> >> But I don't know how it was produced. >>> >> Did he maybe un-pack and re-pack the zips ? >>> >> Cause if I run the backup util, it does correctly produce a ZIP. >>> Unpacking >>> >> it will create folders, not junk. >>> >> >>> >> Sebastian >>> >> >>> >> >>> >> >>> >> >>> >> 2013/2/10 Maxim Solodovnik <solomax...@gmail.com> >>> >> >>> >> > Backup files seems to be corrupted >>> >> > It has junk instead of folders >>> >> > >>> >> > >>> >> > On Sun, Feb 10, 2013 at 9:03 AM, Maxim Solodovnik < >>> solomax...@gmail.com >>> >> > >wrote: >>> >> > >>> >> > > Committed revision 1444471. >>> >> > > >>> >> > > I'll double-check things are now better >>> >> > > >>> >> > > >>> >> > > On Sun, Feb 10, 2013 at 8:59 AM, Maxim Solodovnik < >>> >> solomax...@gmail.com >>> >> > >wrote: >>> >> > > >>> >> > >> I believe it is caused by minor issue in the test >>> >> > >> give me the second I'll fix it >>> >> > >> >>> >> > >> >>> >> > >> On Sun, Feb 10, 2013 at 8:57 AM, seba.wag...@gmail.com < >>> >> > >> seba.wag...@gmail.com> wrote: >>> >> > >> >>> >> > >>> If I comment out the delete action of the imported file I can >>> see >>> >> in my >>> >> > >>> file system some strange files like: >>> >> > >>> >>> >> > >>> >>> >> > >>> >> >>> roomFiles\files\db6139abbf3e4525b3e5cf27f4b13904\db6139abbf3e4525b3e5cf27f4b13904.ods >>> >> > >>> >>> >> > >>> Seems like either the zip'ing or unzip'ing utility does not work >>> >> > proper. >>> >> > >>> I am testing on Mac OSx 10.8.2 >>> >> > >>> and Java 1.6.0_37-b06-434-11M3909 >>> >> > >>> >>> >> > >>> Does the same issue exist on other runtimes too? >>> >> > >>> >>> >> > >>> Sebastian >>> >> > >>> >>> >> > >>> >>> >> > >>> 2013/2/10 seba.wag...@gmail.com <seba.wag...@gmail.com> >>> >> > >>> >>> >> > >>> > ++ the same for the imported files of the File-Explorer. >>> >> > >>> > There are entries in the database, that are assigned to the >>> >> room_id 7 >>> >> > >>> for >>> >> > >>> > the imported user (was userId 1 in the backup file, will be >>> >> user_id 2 >>> >> > >>> after >>> >> > >>> > the import, when importing through the UI). >>> >> > >>> > After the import, I logged in as this user, goto room with Id >>> 7, >>> >> drag >>> >> > >>> and >>> >> > >>> > drop the image and the other file to the whiteboard => both >>> files >>> >> are >>> >> > >>> not >>> >> > >>> > shown, just the "deleted" placeholder. >>> >> > >>> > >>> >> > >>> > There seems to be a serious issue in the file copy action. >>> >> > >>> > Actually by looking at the file section I can see that zero >>> of the >>> >> > >>> files >>> >> > >>> > from the backup have been copied from the backup to the >>> >> corresponding >>> >> > >>> > OpenMeetings sections. >>> >> > >>> > >>> >> > >>> > I guess all issues (recording, profile images and room files) >>> have >>> >> > the >>> >> > >>> > same root somewhere in the importer. >>> >> > >>> > >>> >> > >>> > Sebastian >>> >> > >>> > >>> >> > >>> > >>> >> > >>> > 2013/2/10 seba.wag...@gmail.com <seba.wag...@gmail.com> >>> >> > >>> > >>> >> > >>> > ++ the profile image is not shown in the UI for the imported >>> user. >>> >> > >>> >> According to the ZIP there is a profile image for the userId >>> 2, >>> >> but >>> >> > >>> after >>> >> > >>> >> the import, if you login as that user, >>> >> > >>> >> this imported profile image is not shown, just the default >>> >> > >>> placeholder. >>> >> > >>> >> >>> >> > >>> >> >>> >> > >>> >> 2013/2/10 seba.wag...@gmail.com <seba.wag...@gmail.com> >>> >> > >>> >> >>> >> > >>> >> I imported the backup_v_2_0_0_r1361497.zip >>> >> > >>> >>> >>> >> > >>> >>> The flvrecording is shown in the Recording UI, >>> >> > >>> >>> but if you click on it, the preview image is not shown >>> (deleted >>> >> > >>> >>> placeholder instead) and if you click on play the following >>> >> > >>> exception is >>> >> > >>> >>> shown: >>> >> > >>> >>> >>> >> > >>> >>> baf3-df6530218516 >>> >> > >>> >>> [WARN] [NioProcessor-5] >>> org.red5.server.stream.ProviderService - >>> >> > >>> >>> Exception attempting to lookup file: flvRecording_1.flv >>> >> > >>> >>> java.io.FileNotFoundException: ServletContext resource >>> >> > >>> >>> [/streams/hibernate//flvRecording_1.flv] cannot be resolved >>> to >>> >> URL >>> >> > >>> because >>> >> > >>> >>> it does not exist >>> >> > >>> >>> >>> >> > >>> >>> Sebastian >>> >> > >>> >>> >>> >> > >>> >>> -- >>> >> > >>> >>> Sebastian Wagner >>> >> > >>> >>> https://twitter.com/#!/dead_lock >>> >> > >>> >>> http://www.webbase-design.de >>> >> > >>> >>> http://www.wagner-sebastian.com >>> >> > >>> >>> seba.wag...@gmail.com >>> >> > >>> >>> >>> >> > >>> >> >>> >> > >>> >> >>> >> > >>> >> >>> >> > >>> >> -- >>> >> > >>> >> Sebastian Wagner >>> >> > >>> >> https://twitter.com/#!/dead_lock >>> >> > >>> >> http://www.webbase-design.de >>> >> > >>> >> http://www.wagner-sebastian.com >>> >> > >>> >> seba.wag...@gmail.com >>> >> > >>> >> >>> >> > >>> > >>> >> > >>> > >>> >> > >>> > >>> >> > >>> > -- >>> >> > >>> > Sebastian Wagner >>> >> > >>> > https://twitter.com/#!/dead_lock >>> >> > >>> > http://www.webbase-design.de >>> >> > >>> > http://www.wagner-sebastian.com >>> >> > >>> > seba.wag...@gmail.com >>> >> > >>> > >>> >> > >>> >>> >> > >>> >>> >> > >>> >>> >> > >>> -- >>> >> > >>> Sebastian Wagner >>> >> > >>> https://twitter.com/#!/dead_lock >>> >> > >>> http://www.webbase-design.de >>> >> > >>> http://www.wagner-sebastian.com >>> >> > >>> seba.wag...@gmail.com >>> >> > >>> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> > >> -- >>> >> > >> WBR >>> >> > >> Maxim aka solomax >>> >> > >> >>> >> > > >>> >> > > >>> >> > > >>> >> > > -- >>> >> > > WBR >>> >> > > Maxim aka solomax >>> >> > > >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > WBR >>> >> > Maxim aka solomax >>> >> > >>> >> >>> >> >>> >> >>> >> -- >>> >> Sebastian Wagner >>> >> https://twitter.com/#!/dead_lock >>> >> http://www.webbase-design.de >>> >> http://www.wagner-sebastian.com >>> >> seba.wag...@gmail.com >>> >> >>> > >>> > >>> > >>> > -- >>> > WBR >>> > Maxim aka solomax >>> > >>> >>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >> >> >> >> -- >> Sebastian Wagner >> https://twitter.com/#!/dead_lock >> http://www.webbase-design.de >> http://www.wagner-sebastian.com >> seba.wag...@gmail.com >> > > > > -- > Sebastian Wagner > https://twitter.com/#!/dead_lock > http://www.webbase-design.de > http://www.wagner-sebastian.com > seba.wag...@gmail.com > -- Sebastian Wagner https://twitter.com/#!/dead_lock http://www.webbase-design.de http://www.wagner-sebastian.com seba.wag...@gmail.com