mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

caja-file-operations: fix caption/button in destination error dialogue #1766

Closed basicmaster closed 4 months ago

basicmaster commented 5 months ago

For certain operations, the destination is checked. If an error occurs, the user is asked how to proceed using a dialogue. So far this dialogue was hard-coded to only consider the copy operation.

This fix also considers the other affected operations and generalizes the continue button text.

basicmaster commented 5 months ago

The mentioned dialogue for a move operation:

Before ("kopieren" translates to "to copy"): grafik

After: grafik

basicmaster commented 5 months ago

A real-world use case is e.g. to copy (or move) a larger file to a different file system (e.g. to a USB drive), which doesn't have enough space left to store the file.

My screenshots show the attempt to move a file to a RAM drive (for which caja always shows 0 bytes free space). Everytime I want to copy or move a file to it, I get the shown error message and have to click on the center button to (successfully) copy/move a file to it. The following line in /etc/fstab is used to create/mount the RAM drive:

ramfs   /ramdisk     ramfs   defaults,mode=777        0       0
raveit65 commented 5 months ago

I could reproduce the issue with creating a ramdisk on the fly https://www.linuxbabe.com/command-line/create-ramdisk-linux , and i can confirm that PR fixes the wrong text message.

Edit: no need to create a persistent ramdisk in /etc/fstab for a quick test.

basicmaster commented 4 months ago

From what I understand a file cannot be moved to a different filesystem, only copied there and deleted from the source directory. If caja supports doing that as a "move" operation than yes, this is needed.

This is indeed what caja is doing here when moving a file. Usually GLib's g_file_move (called by caja) already takes care of this.