Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

o Don't add a message if not necessary to the pass through filter.

  That way, we can see the progress bar even on them.
  (the 'format' column now tells us that this is pass-through)
  • Loading branch information...
commit 79e7608e98d5ed0f27371076022745716005f255 1 parent 1971a4a
@hzeller authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 folve-filesystem.cc
View
6 folve-filesystem.cc
@@ -58,7 +58,6 @@ class PassThroughHandler : public FileHandler {
const HandlerStats &known_stats)
: FileHandler(filter_id), filedes_(filedes),
file_size_(-1), max_accessed_(0), info_stats_(known_stats) {
- info_stats_.message.append("; pass through.");
DLogf("Creating PassThrough filter for '%s'", known_stats.filename.c_str());
struct stat st;
file_size_ = (Stat(&st) == 0) ? st.st_size : -1;
@@ -67,8 +66,8 @@ class PassThroughHandler : public FileHandler {
~PassThroughHandler() { close(filedes_); }
virtual int Read(char *buf, size_t size, off_t offset) {
- max_accessed_ = std::max(max_accessed_, (long unsigned int) offset + size);
const int result = pread(filedes_, buf, size, offset);
+ max_accessed_ = std::max(max_accessed_, (long unsigned int) offset + result);
return result == -1 ? -errno : result;
}
virtual int Stat(struct stat *st) {
@@ -597,10 +596,7 @@ FileHandler *FolveFilesystem::CreateFromDescriptor(
config_dirs()[cfg_idx],
&file_info);
if (filter != NULL) return filter;
- } else {
- file_info.message = "No filter config selected.";
}
-
// Every other file-type is just passed through as is.
return new PassThroughHandler(filedes, cfg_idx, file_info);
}
Please sign in to comment.
Something went wrong with that request. Please try again.