Skip to content

Commit b190fb7

Browse files
committed
Include empty files in downloads
1 parent 363bccf commit b190fb7

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

cmd/download.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ func runDownload(cfg config.Config, flags *pflag.FlagSet, args []string) error {
101101
// TODO: deal with it
102102
continue
103103
}
104-
// Don't bother with empty files.
105-
if res.Header.Get("Content-Length") == "0" {
106-
continue
107-
}
108104

109105
path := sf.relativePath()
110106
dir := filepath.Join(metadata.Dir, filepath.Dir(path))

cmd/download_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ func assertDownloadedCorrectFiles(t *testing.T, targetDir string) {
353353

354354
path := filepath.Join(targetDir, "bogus-track", "bogus-exercise", "file-3.txt")
355355
_, err := os.Lstat(path)
356-
assert.True(t, os.IsNotExist(err), "It should not write the file if empty.")
357356
}
358357

359358
func TestDownloadError(t *testing.T) {

0 commit comments

Comments
 (0)