We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b2eddf commit 194b07bCopy full SHA for 194b07b
O365/drive.py
@@ -1658,10 +1658,14 @@ def get_item(self, item_id):
1658
**{self._cloud_data_key: data})
1659
1660
def get_item_by_path(self, item_path):
1661
- """ Returns a DriveItem by it's path: /path/to/file
+ """ Returns a DriveItem by it's absolute path: /path/to/file
1662
:return: one item
1663
:rtype: DriveItem
1664
"""
1665
+
1666
+ if not item_path.startswith("/"):
1667
+ item_path = "/" + item_path
1668
1669
if self.object_id:
1670
# reference the current drive_id
1671
url = self.build_url(
0 commit comments