Skip to content

Commit

Permalink
avoid upload if file is 0 bytes (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatshotty authored Jun 3, 2024
1 parent 9a5cc9e commit 6acfef6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/webdav/tgfs-filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ export class TGFSFileSystem extends VirtualFileSystem {

callback(null, stream);

if ( estimatedSize <= 0 ) {
Logger.info('skip upload because file is 0 bytes');
return;
}

try {
// this.resources[path.toString()] = new TGFSFileResource({
// size: estimatedSize,
Expand Down

0 comments on commit 6acfef6

Please sign in to comment.