-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi,
It seems that GDrive adapter is not following the paths like azure blob and Amazon s3 are doing it. For those two everything is working as expected but not for GDrive.
// Adapter settings
string adapterPrefix = "gdrive";
string rootPath = "/demofolder";
// File system path settings
string path = "/from/demo/app";
string fileName = "example.env";
string localFilePath = @"C:\Users\XXXXXX\Downloads\example.env";
...
// Create Google Drive adapter
var googleDriveAdapter = new GoogleDriveAdapter(adapterPrefix, rootPath, driveService);
// Create file system with Google Drive adapter
googleDriveFileSystem = new FileSystem(new List<IAdapter> { googleDriveAdapter });
...
// Construct virtual path
virtualPath = $"{adapterPrefix}://{path}{fileName}"; // = "gdrive://from/demo/app/example.env"
// Write file to Google Drive
googleDriveFileSystem.WriteFile(virtualPath, binaryData, true);
// Retrieve file from Google Drive
var existingFile = googleDriveFileSystem.GetFile(virtualPath);
The file is stored in the GDrive root:

And then when trying to get the file for the same virtualPath I get the following exception:
"File 'demofolder/from/demo/app/example.env' not found in adapter with prefix 'gdrive'."
Is it me that I'm doing anything wrong?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working