]> git.saurik.com Git - apt.git/blobdiff - ftparchive/writer.cc
Merge branch 'feature/edit-sources' into debian/sid
[apt.git] / ftparchive / writer.cc
index 3283128d81a52ec297dc43f485ceed538b549d98..7ecfe78ede2172c404003ab4dcffac11a9af0a71 100644 (file)
@@ -284,7 +284,8 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath,
                  if (link(FileName.c_str(),OriginalPath) != 0)
                  {
                     // Panic! Restore the symlink
-                    symlink(OldLink,OriginalPath);
+                    if (symlink(OldLink,OriginalPath) != 0)
+                        _error->Errno("symlink", "failed to restore symlink");
                     return _error->Errno("link",_("*** Failed to link %s to %s"),
                                          FileName.c_str(),
                                          OriginalPath);