Updating archive on samba network share fails and deletes original archive
Hi, there is a big problem with file-roller when used on samba network shares. I'm using latest file-roller version 3.32.4 on Arch Linux and also tried to check out the latest commit here. It deleted my whole archive after failing an update operation. From the log file it seems like it's failing when trying to overwrite the original archive, maybe because it's still opened by the process?
Steps to reproduce:
- Open archive on mounted samba network share
- Edit a file and try to save it
- It will fail and delete the original archive once the program is closed
Expected behavior: Do not delete the original archive when failing
Log:
[FR] ../src/fr-window.c:4164 (fr_window_drag_data_received):
::DragDataReceived -->
[FR] ../src/fr-window.c:3293 (_archive_operation_started):
LOADING_ARCHIVE [START] (FR::Window)
[FR] ../src/fr-window.c:4309 (fr_window_drag_data_received):
::DragDataReceived <--
[FR] ../src/fr-command.c:455 (_fr_command_set_filename):
filename : /mnt/share/test.zip
[FR] ../src/fr-command.c:456 (_fr_command_set_filename):
e_filename : '/mnt/share/test.zip'
[FR] ../src/fr-window.c:3131 (_archive_operation_completed):
LOADING_ARCHIVE [DONE] (FR::Window)
[FR] ../src/fr-window.c:3293 (_archive_operation_started):
LISTING_CONTENT [START] (FR::Window)
[FR] ../src/fr-command.c:455 (_fr_command_set_filename):
filename : /mnt/share/test.zip
[FR] ../src/fr-command.c:456 (_fr_command_set_filename):
e_filename : '/mnt/share/test.zip'
[FR] ../src/fr-process.c:954 (execute_current_command):
0/0)
LC_MESSAGES=C
7z l -slt -bd -y -- /mnt/share/test.zip
[FR] ../src/fr-window.c:3131 (_archive_operation_completed):
LISTING_CONTENT [DONE] (FR::Window)
[FR] ../src/fr-window.c:3293 (_archive_operation_started):
EXTRACTING_FILES [START] (FR::Window)
[FR] ../src/fr-command.c:455 (_fr_command_set_filename):
filename : /mnt/share/test.zip
[FR] ../src/fr-command.c:456 (_fr_command_set_filename):
e_filename : '/mnt/share/test.zip'
[FR] ../src/fr-process.c:954 (execute_current_command):
0/0)
LC_MESSAGES=C
7z x -bd -y -o/home/max/.cache/.fr-9G0rEE -- /mnt/share/test.zip plot.py
[FR] ../src/fr-window.c:3131 (_archive_operation_completed):
EXTRACTING_FILES [DONE] (FR::Window)
[FR] ../src/fr-window.c:3293 (_archive_operation_started):
UPDATING_FILES [START] (FR::Window)
[FR] ../src/fr-command.c:455 (_fr_command_set_filename):
filename : /mnt/share/test.zip
[FR] ../src/fr-command.c:456 (_fr_command_set_filename):
e_filename : '/mnt/share/test.zip'
[FR] ../src/fr-command.c:455 (_fr_command_set_filename):
filename : /mnt/share/.fr-yEz1nC/test.zip
[FR] ../src/fr-command.c:456 (_fr_command_set_filename):
e_filename : '/mnt/share/.fr-yEz1nC/test.zip'
[FR] ../src/fr-process.c:954 (execute_current_command):
0/3)
LC_MESSAGES=C
cp -f /mnt/share/test.zip /mnt/share/.fr-yEz1nC/test.zip
[FR] ../src/fr-process.c:954 (execute_current_command):
1/3)
LC_MESSAGES=C
cd /home/max/.cache/.fr-9G0rEE
7z a -tzip -mem=AES128 -bd -y -mx=7 -- /mnt/share/.fr-yEz1nC/test.zip plot.py
[FR] ../src/fr-process.c:954 (execute_current_command):
2/3)
LC_MESSAGES=C
mv -f -- /mnt/share/.fr-yEz1nC/test.zip /mnt/share/test.zip
** ERROR **
mv: cannot move '/mnt/share/.fr-yEz1nC/test.zip' to '/mnt/share/test.zip': Permission denied
[FR] ../src/fr-process.c:954 (execute_current_command):
3/3)
LC_MESSAGES=C
cd /tmp
rm -rf /mnt/share/.fr-yEz1nC
** ERROR **
[FR] ../src/fr-window.c:3131 (_archive_operation_completed):
UPDATING_FILES [DONE] (FR::Window)
[FR] ../src/fr-window.c:3293 (_archive_operation_started):
LISTING_CONTENT [START] (FR::Window)
[FR] ../src/fr-command.c:455 (_fr_command_set_filename):
filename : /mnt/share/test.zip
[FR] ../src/fr-command.c:456 (_fr_command_set_filename):
e_filename : '/mnt/share/test.zip'
[FR] ../src/fr-process.c:954 (execute_current_command):
0/0)
LC_MESSAGES=C
7z l -slt -bd -y -- /mnt/share/test.zip
** ERROR **
No such file or directory
System ERROR:
ERROR: /mnt/share/test.zip : opening : No such file or directory
[FR] ../src/fr-window.c:3131 (_archive_operation_completed):
LISTING_CONTENT [DONE] (FR::Window)
The network share is mounted with this line in /etc/fstab
:
//server/share /mnt/share cifs noauto,x-systemd.automount,noperm,_netdev,uid=1000,gid=985 0 0