]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/mmap.cc
French translation update
[apt.git] / apt-pkg / contrib / mmap.cc
index abcae46feee411e0beb7b7bd97a057bf7264ff7a..eed43825087407ccd989c6e4771357e52c86f0dd 100644 (file)
@@ -192,7 +192,8 @@ DynamicMMap::~DynamicMMap()
    unsigned long EndOfFile = iSize;
    iSize = WorkSpace;
    Close(false);
-   ftruncate(Fd->Fd(),EndOfFile);
+   if(ftruncate(Fd->Fd(),EndOfFile) < 0)
+      _error->Errno("ftruncate", _("Failed to truncate file"));
 }  
                                                                        /*}}}*/
 // DynamicMMap::RawAllocate - Allocate a raw chunk of unaligned space  /*{{{*/
@@ -209,7 +210,7 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln)
    // Just in case error check
    if (Result + Size > WorkSpace)
    {
-      _error->Error("Dynamic MMap ran out of room");
+      _error->Error(_("Dynamic MMap ran out of room"));
       return 0;
    }