Chinese (simplified) program translation update
[ntk/apt.git] / methods / file.cc
index 5025c99..12db622 100644 (file)
@@ -5,7 +5,7 @@
 
    File URI method for APT
    
-   This simply checks that the file specified exists, if so the relevent
+   This simply checks that the file specified exists, if so the relevant
    information is returned. If a .gz filename is specified then the file
    name with .gz removed will also be checked and information about it
    will be returned in Alt-*
@@ -21,8 +21,9 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/strutl.h>
 
+#include <string>
 #include <sys/stat.h>
-#include <unistd.h>
+
 #include <apti18n.h>
                                                                        /*}}}*/
 
@@ -83,7 +84,7 @@ bool FileMethod::Fetch(FetchItem *Itm)
 
    Hashes Hash;
    FileFd Fd(Res.Filename, FileFd::ReadOnly);
-   Hash.AddFD(Fd.Fd(), Fd.Size());
+   Hash.AddFD(Fd);
    Res.TakeHashes(Hash);
    URIDone(Res);
    return true;