dvc add causing "ERROR: failed to download" after dvc remove and gc
Hi, I am using  **dvc 0.50.1**
I found if I do **dvc add** after **dvc remove** and **dvc gc**. It leads to an error as the following:

```
$dvc add data.csv
$dvc remove data.csv.dvc
$rm data.csv.dvc
$dvc gc
$dvc add data.csv

ERROR: failed to download ".dvc/cache/............"
[Errno 2] No such file or directory: ''/home/ccha97u/Documents/dvc_example/.dvc/cache/....."
```
Is this an expected behavior? How do I solve this?


diff --git a/dvc/remote/base.py b/dvc/remote/base.py
index 58cf47995..f7ede2e81 100644
--- a/dvc/remote/base.py
+++ b/dvc/remote/base.py
@@ -242,6 +242,17 @@ class RemoteBASE(object):
             return None
 
         checksum = self.state.get(path_info)
+
+        # If we have dir checksum in state db, but dir cache file is lost,
+        # then we need to recollect the dir via .get_dir_checksum() call below,
+        # see https://github.com/iterative/dvc/issues/2219 for context
+        if (
+            checksum
+            and self.is_dir_checksum(checksum)
+            and not self.exists(self.cache.checksum_to_path_info(checksum))
+        ):
+            checksum = None
+
         if checksum:
             return checksum
 
['dvc/remote/base.py']