-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Data Lake Storage Gen2bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
Normal Python behavior is to interpret pathlib.PurePosixPath as a string. FileSystemClient.create_directory seems to instead take the name parameter (PurePosixPath.name) and therefore always creates a top-level folder if provided a PurePosixPath. A workaround is to explicitely convert to str beforehand, but I will probably not be the last one to make that mistake, since the framework for ADLS Gen1 treated PurePosixPath as expected.
Example:
To Reproduce
from pathlib import PurePosixPath
mypath = PurePosixPath("toplevel/subfolder/newfolder")
my_file_system_client.create_directory(mypath)
Expected behavior
Create a directory named newfolder in "toplevel/subfolder", just like os.mkdir would.
Actual behavior
Creates a folder newfolder in root.
Additional context
I assume it treats the PurePosixPath as a DirectoryProperties object and takes the "name" argument.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Data Lake Storage Gen2bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that