roamer icon indicating copy to clipboard operation
roamer copied to clipboard

Use mv when applicable

Open abaldwin88 opened this issue 6 years ago • 5 comments

This...

roamer-trash-copy /Users/abaldwin/Desktop/bleh/meh.txt
cp /Users/abaldwin/Desktop/bleh/meh.txt /Users/abaldwin/Desktop/bleh/argh.txt
rm /Users/abaldwin/Desktop/bleh/meh.txt

Should instead be this...

roamer-trash-copy /Users/abaldwin/Desktop/bleh/meh.txt
mv /Users/abaldwin/Desktop/bleh/meh.txt /Users/abaldwin/Desktop/bleh/argh.txt

abaldwin88 avatar Aug 30 '17 00:08 abaldwin88

Hi @abaldwin88, could you please describe little bit the reason what command roamer-trash-copy exists for? I want to pick up this issue.

alex-bender avatar Oct 06 '17 11:10 alex-bender

It does two things:

  • It copies an entry (document or folder) into the trash directory. Default directory is here: ~/.roamer-data/trash.
  • It saves the trash entry in the SQLite db

This is done so that users can delete/overwrite files but still paste it in later sessions. In short it makes cut/paste operations work.

abaldwin88 avatar Oct 06 '17 16:10 abaldwin88

Aha, I see, thanks.

alex-bender avatar Oct 06 '17 16:10 alex-bender

What do you think about using hard links instead of ~~copying~~ moving files?

Maybe even copying.

alex-bender avatar Oct 06 '17 16:10 alex-bender

The tricky part is linking to the correct content after a file has been copied over top of. Take a look through some of the test cases around that.

On Oct 6, 2017 12:12 PM, "Alex Bender" [email protected] wrote:

What do you think about using hard links instead of copying files?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/abaldwin88/roamer/issues/16#issuecomment-334800656, or mute the thread https://github.com/notifications/unsubscribe-auth/AOeD_bzvTWPkk9CUCovKl7SA4JuAJtXZks5splF0gaJpZM4PGu8H .

abaldwin88 avatar Oct 06 '17 19:10 abaldwin88