Index: chrome/common/extensions/docs/server2/local_file_system.py |
diff --git a/chrome/common/extensions/docs/server2/local_file_system.py b/chrome/common/extensions/docs/server2/local_file_system.py |
index 2955d8c64b35149635862a059850a49270213674..d243583638a27f7eab8cb05466e9986f6f94123a 100644 |
--- a/chrome/common/extensions/docs/server2/local_file_system.py |
+++ b/chrome/common/extensions/docs/server2/local_file_system.py |
@@ -3,15 +3,19 @@ |
# found in the LICENSE file. |
import os |
+import sys |
from file_system import FileSystem, FileNotFoundError, StatInfo, ToUnicode |
from future import Future |
class LocalFileSystem(FileSystem): |
- """FileSystem implementation which fetches resources from the local |
+ '''FileSystem implementation which fetches resources from the local |
filesystem. |
- """ |
- def __init__(self, base_path): |
+ ''' |
+ def __init__(self, base_path=None): |
+ if base_path is None: |
+ # Default to the base of the extensions directory. |
+ base_path = os.path.join(sys.path[0], os.pardir, os.pardir) |
self._base_path = self._ConvertToFilepath(base_path) |
def _ConvertToFilepath(self, path): |