Repository: PrefectHQ/prefect

Issue:
LocalResult doesn't work with different drive (Windows 10)
## Description
Just getting started with Prefect... looks very promising, thanks! I ran into this issue though:

On MS Windows 10, LocalResult seems to only work with a `dir` pointing to the C: drive. It doesn't work for the E: drive. See reproduction example.

This is a major issue on my PCs - they have a very small C: drive, and much larger SSDs on other drives.

## Expected Behavior
LocalResult instantiate without problem and saves results in E: path.

## Reproduction
The following works:
```
from prefect.engine.results.local_result import LocalResult
result = LocalResult(dir="c:/cl/amd/code/dl/mopt/tests/data/result/playground_prefect")
```
If I change the path to use the E: drive instead (`c:/cl/amd/code/dl/mopt/tests/data/result/playground_prefect`), I get this error:
```
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-29-26b211f5d685> in <module>
----> 1 result = LocalResult(dir="e:/cl/amd/code/dl/mopt/tests/data/result/playground_prefect")

d:\Users\chris\Anaconda3\envs\miniopt\lib\site-packages\prefect\engine\results\local_result.py in __init__(self, dir, validate_dir, **kwargs)
     33         if (
     34             dir is None
---> 35             or os.path.commonpath([full_prefect_path, os.path.abspath(dir)])
     36             == full_prefect_path
     37         ):

d:\Users\chris\Anaconda3\envs\miniopt\lib\ntpath.py in commonpath(paths)
    619         # caught.
    620         if len(set(d for d, p in drivesplits)) != 1:
--> 621             raise ValueError("Paths don't have the same drive")
    622 
    623         drive, path = splitdrive(paths[0].replace(altsep, sep))

ValueError: Paths don't have the same drive
```

## Environment
Prefect 0.11.1 installed via pip
pwd was in E: drive

`prefect diagnostics`:
{
  "config_overrides": {},
  "env_vars": [],
  "system_information": {
    "platform": "Windows-10-10.0.18362-SP0",
    "prefect_version": "0.11.1",
    "python_version": "3.7.7"
  }
}


Discussion:

Resolving patch:
diff --git a/src/prefect/engine/results/local_result.py b/src/prefect/engine/results/local_result.py
--- a/src/prefect/engine/results/local_result.py
+++ b/src/prefect/engine/results/local_result.py
@@ -30,11 +30,16 @@ def __init__(
         self, dir: str = None, validate_dir: bool = True, **kwargs: Any
     ) -> None:
         full_prefect_path = os.path.abspath(config.home_dir)
-        if (
-            dir is None
-            or os.path.commonpath([full_prefect_path, os.path.abspath(dir)])
-            == full_prefect_path
-        ):
+        common_path = ""
+        try:
+            if dir is not None:
+                common_path = os.path.commonpath(
+                    [full_prefect_path, os.path.abspath(dir)]
+                )
+        except ValueError:
+            # ValueError is raised if comparing two paths in Windows from different drives, e.g., E:/ and C:/
+            pass
+        if dir is None or common_path == full_prefect_path:
             directory = os.path.join(config.home_dir, "results")
         else:
             directory = dir


Test patch:
diff --git a/tests/engine/results/test_results.py b/tests/engine/results/test_results.py
--- a/tests/engine/results/test_results.py
+++ b/tests/engine/results/test_results.py
@@ -1,5 +1,6 @@
 import os
 import json
+import sys
 import tempfile
 from typing import Union
 
@@ -198,3 +199,8 @@ def test_local_exists_full_path(self, tmp_dir):
         new_result = result.write("so-much-data", thing=44)
         assert result.exists("44.txt") is True
         assert result.exists(os.path.join(tmp_dir, "44.txt")) is True
+
+    @pytest.mark.skipif(sys.platform != "win32", reason="Windows specific test")
+    def test_local_init_with_different_drive_works_on_windows(self):
+        result = LocalResult(dir="E:/location", validate_dir=False)
+        assert result.dir == "E:/location"