iterative / iterative/PyDrive2

How to distinguish between same-named files and directories in Google Drive

Offen
#295 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
Python
Sterne
670
Forks
75
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

How to distinguish between same-named files and directories in Google Drive ?

In my GDrive, I have encountered a situation where there are two files with the same name (test1) and identical sizes. To obtain the list of files along with their details, I used fsspec.ls with detail=True, resulting in the following output:
```
[{'type': 'file', 'name': 'root/testFolder/test1', 'size': 1024, 'checksum': None}, {'type': 'file', 'name': 'root/testFolder/test1', 'size': 1024, 'checksum': None}]
```
As you can see, both files have the same name and path. Now, I am uncertain about which file will be downloaded if I attempt to do so using the provided name.

will it fix If we add item_ids in metadata ?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by tracing how fsspec.ls with detail=True represents Google Drive items and how downloads resolve a name when duplicates exist. Check whether item IDs are available in the returned metadata; done should define a reliable way to distinguish duplicate files and make the selected download behavior clear.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.