Skip to content

Commit

Permalink
Add simple sanity checks on the location
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Nov 19, 2023
1 parent 60a43cd commit 480be61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ class ObjectAppendStream final : public io::OutputStream {
} else {
try {
auto properties = block_blob_client_->GetProperties();
// TODO: Consider adding a check for whether its a directory.
content_length_ = properties.Value.BlobSize;
pos_ = content_length_;
} catch (const Azure::Storage::StorageException& exception) {
Expand Down Expand Up @@ -947,7 +946,8 @@ class AzureFileSystem::Impl {
const AzureLocation& location,
const std::shared_ptr<const KeyValueMetadata>& metadata, const bool truncate,
AzureFileSystem* fs) {
// TODO: Ensure cheap checks which don't require a call to Azure are done.
RETURN_NOT_OK(ValidateFileLocation(location));
ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(location.path));
if (location.empty() || location.path.empty()) {
return ::arrow::fs::internal::PathNotFound(location.path);
}
Expand Down

0 comments on commit 480be61

Please sign in to comment.