File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
src/Ramstack.FileSystem.Google Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,8 @@ protected override void Dispose(bool disposing)
138138 {
139139 _stream . Position = 0 ;
140140
141- if ( _stream . Length != 0 )
142- {
143- var destination = new global ::Google . Apis . Storage . v1 . Data . Object { Bucket = _fs . BucketName , Name = _objectName } ;
144- _fs . StorageClient . UploadObject ( destination , _stream ) ;
145- }
141+ var destination = new global ::Google . Apis . Storage . v1 . Data . Object { Bucket = _fs . BucketName , Name = _objectName } ;
142+ _fs . StorageClient . UploadObject ( destination , _stream ) ;
146143 }
147144 finally
148145 {
@@ -163,14 +160,11 @@ public override async ValueTask DisposeAsync()
163160 {
164161 _stream . Position = 0 ;
165162
166- if ( _stream . Length != 0 )
167- {
168- var destination = new global ::Google . Apis . Storage . v1 . Data . Object { Bucket = _fs . BucketName , Name = _objectName } ;
163+ var destination = new global ::Google . Apis . Storage . v1 . Data . Object { Bucket = _fs . BucketName , Name = _objectName } ;
169164
170- await _fs . StorageClient
171- . UploadObjectAsync ( destination , _stream )
172- . ConfigureAwait ( false ) ;
173- }
165+ await _fs . StorageClient
166+ . UploadObjectAsync ( destination , _stream )
167+ . ConfigureAwait ( false ) ;
174168 }
175169 finally
176170 {
You can’t perform that action at this time.
0 commit comments