Tar Without Paths?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Tar Without Paths?

asdf asdf
Hello,

Is it possible to use erl_tar open or create without including the full path to the files? Right now, every add or create adds files with their full path, so when they are extracted, they come in the form of “/home/wiget/server/files_to_tar/file1.txt instead of files_to_tar/file.txt. The only options in the man pages are irrelevant to my issue, so I assume there is some way around this. If anyone has found a way, I would greatly appreciate your insight!
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Tar Without Paths?

Anthony Molinaro-4
Hi,

I haven’t tested it but erl_tar:add/3,4 have a way to specify the NameInTar when adding a file.


HTH,

-Anthony

On Nov 20, 2017, at 9:03 AM, code wiget <[hidden email]> wrote:

Hello,

Is it possible to use erl_tar open or create without including the full path to the files? Right now, every add or create adds files with their full path, so when they are extracted, they come in the form of “/home/wiget/server/files_to_tar/file1.txt instead of files_to_tar/file.txt. The only options in the man pages are irrelevant to my issue, so I assume there is some way around this. If anyone has found a way, I would greatly appreciate your insight!
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Tar Without Paths?

Fred Youhanaie-2
In reply to this post by asdf asdf
Hi

Are the filenames in the FileList that you supply to create/2 (or /3) in absolute or relative form?

I believe erl_tar will use whatever filenames you give it.

Cheers,
f.

On 20/11/17 17:03, code wiget wrote:
> Hello,
>
> Is it possible to use erl_tar open or create without including the full path to the files? Right now, every add or create adds files with their full path, so when they are extracted, they come in the form of “/home/wiget/server/files_to_tar/file1.txt instead of files_to_tar/file.txt. The only options in the man pages are irrelevant to my issue, so I assume there is some way around this. If anyone has found a way, I would greatly appreciate your insight!
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>

Fred Youhanaie
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Tar Without Paths?

Ryan Auger
Anthony’s solution worked, I can’t believe I missed it. Thanks!

> On Nov 20, 2017, at 12:58 PM, Fred Youhanaie <[hidden email]> wrote:
>
> Hi
>
> Are the filenames in the FileList that you supply to create/2 (or /3) in absolute or relative form?
>
> I believe erl_tar will use whatever filenames you give it.
>
> Cheers,
> f.
>
> On 20/11/17 17:03, code wiget wrote:
>> Hello,
>> Is it possible to use erl_tar open or create without including the full path to the files? Right now, every add or create adds files with their full path, so when they are extracted, they come in the form of “/home/wiget/server/files_to_tar/file1.txt instead of files_to_tar/file.txt. The only options in the man pages are irrelevant to my issue, so I assume there is some way around this. If anyone has found a way, I would greatly appreciate your insight!
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> Fred Youhanaie
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions