Hi,
First of all, thanks a lot for this wonderful app, fully mobile-compatible linux apps are hard to come by!
With the latest Portfolio 0.9.11, it seems there is a permission issue with the new trash folder feature.
When I run the app from the app drawer, it fails silently. When I run it from the terminal, the stacktrace is the following:
Traceback (most recent call last):
File "/usr/bin/dev.tchx84.Portfolio", line 40, in <module>
from portfolio import main
File "/usr/lib/python3.9/site-packages/portfolio/main.py", line 28, in <module>
from .window import PortfolioWindow
File "/usr/lib/python3.9/site-packages/portfolio/window.py", line 29, in <module>
from .worker import PortfolioCutWorker
File "/usr/lib/python3.9/site-packages/portfolio/worker.py", line 30, in <module>
from .trash import default_trash
File "/usr/lib/python3.9/site-packages/portfolio/trash.py", line 177, in <module>
default_trash = PortfolioTrash()
File "/usr/lib/python3.9/site-packages/portfolio/trash.py", line 41, in __init__
self.setup()
File "/usr/lib/python3.9/site-packages/portfolio/trash.py", line 55, in setup
self._setup_trash_dir(trash_dir)
File "/usr/lib/python3.9/site-packages/portfolio/trash.py", line 44, in _setup_trash_dir
os.makedirs(os.path.join(trash_dir, "info"), exist_ok=True)
File "/usr/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/usr/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission non accordée: '/.Trash-1000'
Portfolio is trying to create a Trash folder in my root directory, hence the permission issue.
The issue is resolved if I manually create the Trash folders in the root directory:
sudo mkdir -p /.Trash-1000/files
sudo mkdir -p /.Trash-1000/info
It might come from my configuration, I'm using archlinux ARM with the phosh desktop environment and this storage configuration:
# df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
dev 1,4G 0 1,4G 0% /dev
run 1,5G 1,6M 1,5G 1% /run
/dev/mapper/cryptroot 29G 6,2G 21G 23% /
tmpfs 1,5G 568K 1,5G 1% /dev/shm
tmpfs 1,5G 8,0K 1,5G 1% /tmp
/dev/mmcblk0p1 115G 85G 24G 79% /home/alarm/SD
/dev/mmcblk2p1 243M 107M 137M 44% /boot
tmpfs 300M 72K 300M 1% /run/user/1000
The workaround works for me but it's not really a good practice to have that kind of folder in the root directory, that's why I'm still reporting it.