mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
Fix a bug in file payload.
PiperOrigin-RevId: 640494382
This commit is contained in:
committed by
Copybara-Service
parent
334ef7a3e1
commit
152cabab7c
@@ -19,7 +19,7 @@ namespace nearby {
|
||||
namespace connections {
|
||||
|
||||
enum class PayloadType { kUnknown = 0, kBytes = 1, kFile = 2, kStream = 3 };
|
||||
enum PayloadDirection {
|
||||
enum class PayloadDirection {
|
||||
UNKNOWN_DIRECTION_PAYLOAD = 0,
|
||||
INCOMING_PAYLOAD = 1,
|
||||
OUTGOING_PAYLOAD = 2,
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "internal/platform/implementation/shared/file.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
@@ -37,7 +36,7 @@ IOFile::IOFile(const absl::string_view file_path, size_t size)
|
||||
: file_(std::string(file_path.data(), file_path.size()),
|
||||
std::ios::binary | std::ios::in | std::ios::ate),
|
||||
path_(file_path),
|
||||
total_size_(file_.tellg()) {
|
||||
total_size_(size) {
|
||||
file_.seekg(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user