Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7522405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:30:46+00:00 2026-05-30T02:30:46+00:00

When I invoke: File input = new File(cmake.tar.gz); TFile sourceFile = new TFile(input); TFile

  • 0

When I invoke:

File input = new File("cmake.tar.gz");
TFile sourceFile = new TFile(input);
TFile targetFile = new TFile(File.createTempFile("cmake", ".zip"));
try
{
    TFile.cp_rp(sourceFile, targetFile, TArchiveDetector.NULL);
}
finally
{
    TFile.umount(targetFile);
}

I get:

java.io.IOException: C:\Users\Gili\AppData\Local\Temp\cmake4527983120069708378.zip (not a directory)
        at de.schlichtherle.truezip.file.TBIO.cp_r0(TBIO.java:163)
        at de.schlichtherle.truezip.file.TBIO.cp_r(TBIO.java:142)
        at de.schlichtherle.truezip.file.TFile.cp_rp(TFile.java:3364)
        at com.googlecode.cmakemavenproject.GetBinariesMojo.download(GetBinariesMojo.java:275)

How can I instruct TrueZip to create a new .zip file containing the contents of the .tar.gz file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:30:47+00:00Added an answer on May 30, 2026 at 2:30 am

    The issue is that the target archive file already exists as an empty file once you’ve called File.createTempFile(*), which will be treated as a false positive archive file by the TrueZIP Kernel. According to this logic, your subsequent call to TFile.cp_rp(*) tries to recursively copy a virtual directory to a plain file, which cannot work.

    To make your code work, simply call File.delete() on the object returned by File.createTempFile(*). The remainder of your code should then work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to be able to invoke a file download from rails using link
To see what file to invoke the unrar command on, one needs to determine
How do I invoke an EXE from a batch file without having the latter
I am trying to invoke an ANT target from Windows (right-click) file context menu.
I have to test a program which takes one input file. I have put
Hi I am new to Z3 SMT solver. I know you can invoke Z3
We have a form with five <input type=file/> elements that is in production and
I have a file input field with opacity: 0; and filter: alpha(opacity: 0); that
The file is here http://dl.dropbox.com/u/12337149/history.csv I try to read the data as follows for
I need to write a function whose input argument should be file name, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.