summaryrefslogtreecommitdiff
path: root/src/FileEntry.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FileEntry.cc')
-rw-r--r--src/FileEntry.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/FileEntry.cc b/src/FileEntry.cc
index d0c72de0..548f1123 100644
--- a/src/FileEntry.cc
+++ b/src/FileEntry.cc
@@ -45,7 +45,8 @@ FileEntry::FileEntry(const string& path,
FileEntry::~FileEntry() {}
-void FileEntry::setupDir(const string& parentDir) {
+void FileEntry::setupDir(const string& parentDir)
+{
string absPath = parentDir+"/"+path;
char* temp = strdup(absPath.c_str());
string dir = string(dirname(temp));
@@ -62,3 +63,15 @@ void FileEntry::setupDir(const string& parentDir) {
throw new DlAbortEx("Failed to create directory %s.", dir.c_str());
}
}
+
+FileEntry& FileEntry::operator=(const FileEntry& entry)
+{
+ if(this != &entry) {
+ path = entry.path;
+ length = entry.length;
+ offset = entry.offset;
+ extracted = entry.extracted;
+ requested = entry.requested;
+ }
+ return *this;
+}