allanr
Posts: 3
Joined: Thu Jan 10, 2019 1:43 pm

Raspberry Pi Leafpad erases content of Samba-shared text files

Mon Jan 14, 2019 7:04 pm

I'm new to the Raspberry Pi world and was very pleased to get it all setup and sharing files with Linux Mint and Win 7 PCs using Samba instructions at https://www.raspberrypi.org/documentati ... s/samba.md

However when using Leafpad on the Pi to edit a text file on a networked PC, the remote file opens ok and edits proceed as normal, but immediately after a 'Save' the Leafpad window is cleared and File Manager reports the text file has 0 bytes. Opening the file in Geany confirms it is now empty.

This behaviour occurs with files on a remote Linux PC and a Win 7 PC. Comparable tests with Geany work correctly with no data loss. As a double-check I installed gedit on the Pi and it functions properly. It is only Leafpad that causes data loss.

I've searched the Raspbian forum but not found any other reports, but I did find this Github thread https://github.com/stevenhoneyman/l3afpad/issues/13 describing a similar situation (Nov 2015) but no resolution.

The xed and Geany editors in Linux Mint, and Notepad++ in Win 7 edit remote text files on the Pi correctly, which I suppose is the more conventional way of working. However, as this issue is pretty serious I wondered if there was a solution or workaround?
At the moment I've made Geany the default text editor.

Thanks.

System: Pi 3B+ with latest Raspbian 9.6

Andyroo

Re: Raspberry Pi Leafpad erases content of Samba-shared text files

Mon Jan 14, 2019 10:26 pm

There is a fix here https://bugs.archlinux.org/task/44681 that needs two lines swapping over and a recompile if you are in love with Leafpad :lol:

More interestingly is the note below that describes that the error depends on the way you mount the share! That may be an easier fix to test than a make...

allanr
Posts: 3
Joined: Thu Jan 10, 2019 1:43 pm

Re: Raspberry Pi Leafpad erases content of Samba-shared text files

Tue Jan 15, 2019 9:06 pm

Thanks Andyroo for the informative link.

I'll stick with Geany as my default text editor to avoid getting too side-tracked from the original Pi project! and hopefully the thread might help others in the future.

Return to “Troubleshooting”