babarot / gomi

🗑️ Replacement for UNIX rm command!
https://babarot.me/gomi
MIT License
316 stars 13 forks source link

If the file with same name will be removed in same second, the first one will be erased. #18

Closed olorin37 closed 4 years ago

olorin37 commented 4 years ago

How to reproduce:

Just ran:

echo one > abc; gomi abc; echo bazinga > abc; gomi abc
ls .gomi/2020/03/02/
# => abc.15_30_35    # and nothing more (assuming no more gomi uses in the day).
cat ~/.gomi/2020/03/02/abc.15_30_35
# => bazinga

This looks not so match dangerous, because gomi is rather not for scripts but for interactive use. But in junction with indexing files with their on name (instead of path) cause something more severe, what you say for it:

echo one > abc.txt
echo two > anohter-location/abc.txt
gomi abc.txt anohter-location/abc.txt
cat ~/.gomi/2020/03/02/abc.txt.15_47_15
# => two # and there is no first file...
babarot commented 4 years ago

What version do you use?

I cannot reproduce this...

$ echo one > abc; gomi abc; echo bazinga > abc; gomi abc
$ tree ~/.gomi/2020/03/03/
/Users/b4b4r07/.gomi/2020/03/03
├── bpeifbquof2n3l76ee3g
│  └── abc.bpeifbquof2n3l76ee40
└── bpeifbquof2n3la40sa0
   └── abc.bpeifbquof2n3la40sag

$ cat ~/.gomi/2020/03/03/bpeifbquof2n3l76ee3g/abc.bpeifbquof2n3l76ee40
one
$ cat ~/.gomi/2020/03/03/bpeifbquof2n3la40sa0/abc.bpeifbquof2n3la40sag
bazinga
olorin37 commented 4 years ago

ok, if you uses hashes here, I has to use some older version... I cannot chech it now, but I will do that and notify, if problem disappear by update.

thanks.


From: Masaki ISHIYAMA notifications@github.com Sent: Monday, March 2, 2020 4:39:42 PM To: b4b4r07/gomi gomi@noreply.github.com Cc: Jakub A. G. jakub.gramsz@gmail.com; Author author@noreply.github.com Subject: Re: [b4b4r07/gomi] If the file with same name will be removed in same second, the first one will be erased. (#18)

What version do you use?

I cannot reproduce this...

$ echo one > abc; gomi abc; echo bazinga > abc; gomi abc

$ tree ~/.gomi/2020/03/03/

/Users/b4b4r07/.gomi/2020/03/03

├── bpeifbquof2n3l76ee3g

│ └── abc.bpeifbquof2n3l76ee40

└── bpeifbquof2n3la40sa0

└── abc.bpeifbquof2n3la40sag

$ cat ~/.gomi/2020/03/03/bpeifbquof2n3l76ee3g/abc.bpeifbquof2n3l76ee40

one

$ cat ~/.gomi/2020/03/03/bpeifbquof2n3la40sa0/abc.bpeifbquof2n3la40sag

bazinga

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/b4b4r07/gomi/issues/18?email_source=notifications&email_token=ABNIB5MEO2RG4H4H66QO5RTRFPHL5A5CNFSM4K7V3C62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPYUEI#issuecomment-593463825, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABNIB5NACZG5RUH5UVVI77TRFPHL5ANCNFSM4K7V3C6Q.

babarot commented 4 years ago

👍 please feel free to open again if the problem is not gone