Open hugobuddel opened 3 years ago
The problems get a bit more annoying when there is both a CollectionType
(directory) and a DocumentType
with the same name. There is only a 50/50 chance that entering a directory works. stat
ing a file in such a directory from outside it (e.g. through rmapi -ni stat DirectoryWithSameNameAsFile/somenormalfile
) will only work half of the time (both randomly, so retrying helps).
Is it possible to
stat
orget
different files that share the sameVissibleName
?I had some problems with sending files from my Android phone to my reMarkable 1 through the cloud. Every time I opened the app, it would send the same files again (and then often crash). So I ended up with several files with the same name. (I solved that issue by cleaning the cache of the app.)
I can see the duplicate files with
ls
(excluding irrelevant files):However, when I stat one, it selects an arbitrary one:
I'm not sure which one is retrieved with
get
ormget
.mget
only got me one of the three files.Now it is quite simple to fix this for me: by renaming the files or deleting the duplicates, which is what I will do. But the primary reason for using
rmapi
was exactly because I wanted to have a full backup before trying to remedy this and several other problems.Maybe
rmapi
could do something sensible when the user tries tostat
,get
ormget
different files with the same name. It knows when this happens, because the duplicate filenames show up inls
. E.g.rmapi
couldstat
,get
ormget
, e.g. with a numerical suffix in the base of the filename (like browsers often do),