[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 4/4] lpt: Unterstützung für Links in Paketen



+ lpt: Unterstützung für harte und symbolische Links in Paketen

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/pas/lpt/helpers.pas |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/modules/pas/lpt/helpers.pas b/src/modules/pas/lpt/helpers.pas
index b26ff4b..b9a4b76 100644
--- a/src/modules/pas/lpt/helpers.pas
+++ b/src/modules/pas/lpt/helpers.pas
@@ -217,6 +217,7 @@ var
     dir, filename, ext: String;
 
     f: file;
+    filetype: char;
 begin
     while tar.hasNext do begin
         path := tar.NextFilename;
@@ -224,11 +225,14 @@ begin
 
         mkpath(targetpath + '/' + dir);
 
-        if tar.NextFiletype = TAR_TYPE_FILE then begin
+        filetype := tar.NextFiletype;
+        if filetype = TAR_TYPE_FILE then begin
             Assign(f, targetpath + '/' + path);
             Rewrite(f, 1);
             tar.ExtractFile(f);
             Close(f);
+        end else if filetype in [TAR_TYPE_HARDLINK, TAR_TYPE_SYMLINK] then begin
+            tar.ExtractLink(targetpath);
         end else begin
             tar.SkipFile;
         end;
-- 
1.6.0.2