Jump to content
Mads

Files end up as directories in zip archive

Recommended Posts

LabVIEW 2017 with OpenG Zip Tools 4.1.02 on cRIO-9030 (Linux RT target).

I had a piece of code developed in LabVIEW 2015 for a cRIO-9030 where a folder is compressed with the Zlib Compress Directory function, and it has worked for years...Now I converted it to LabVIEW 2017, and for some reason any files (lots of .ini files) in the directory will now end up as folders. What is even stranger is that if I debug I can see that the files are detected as files as they should by the zlib file information VI. I seem to remember having run into a similar issue a long time ago, but I cannot remember what the solution was..

Or perhaps it is a new issue on 2017? I'm in a bit of a hurry so I'm throwing out a question here just in case I get a response before I've spent more time on it...Any ideas?

Share this post


Link to post
Share on other sites

It seems as far as I've established so far that everything that gets passed on to the linked library calls are the same on the Linux target as on Windows, (the file attributes e.g. are calculated to be 0) but the resulting file has minor changes (attribute flags I presume; I have not gotten into the details of the format yet) in the first and last lines of the archive. Otherwise the content is identical (in other words the files are there, but incorrectly identified as directories so I do not get to their content).  Perhaps it has never worked on these Linux RT targets :-O I hope I'm wrong.

I know the deflate/inflate works on Linux RT targets, but discovered now that for the directory compression a different method had been put in place at some point in time for the cRIO-9030, so I was wrong when I said it had worked before...It was, it seems, just due to an override on those targets.

Share this post


Link to post
Share on other sites

I copy them to a Windows computer and open them there with Explorer.

I just reduced this down now to compression of a single file on a cRIO-9030 with LabVIEW 2015. The input and output files, plus the source (just the top level) is included in the attached file.

Zip test.zip

 

I've also attached a capture of the subVI front panels in the call chain, if that might offer any clues.

Captured front panels.PNG

Edited by Mads
Added picture

Share this post


Link to post
Share on other sites

Thanks I'll have a look at this over the weekend.

EDIT:

I did have some look at this and got the newer code to work a bit more, but need to test on a real x64 cRIO system. Hope to get my hands on one during this week.

Edited by rolfk
  • Like 1

Share this post


Link to post
Share on other sites

Haven't forgotten this but there needs to be some more work done as I also updated the whole source code of the shared library in the past and I need to do some more tests. But for now I'm taking off for some well deserved vacation.

  • Like 1

Share this post


Link to post
Share on other sites

The problem does not seem to be Linux RT as such, but the cRIO-9030 - so probably the fact that it is x64.

I took the same code and ran it on a cRIO-9063 (ARM) which also runs Linux RT, and it works as it should. 

 

Edited by Mads

Share this post


Link to post
Share on other sites

I figured as much as I did try on a myRIO and also on a normal Linux x86 system and couldn't reproduce the problem. I do have currently a 9035 available for another project (which has higher priority) and will try it on that one as well very soon.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.