Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"delete from disk" action does not delete file from disk [solved] #1375

Closed
jmsalvat opened this issue Feb 14, 2024 · 5 comments
Closed

"delete from disk" action does not delete file from disk [solved] #1375

jmsalvat opened this issue Feb 14, 2024 · 5 comments

Comments

@jmsalvat
Copy link

jmsalvat commented Feb 14, 2024

  • [x ] I have checked the FAQ for answers.
  • [ x] I have checked the Changelog that the issue is not already fixed.
  • [ x] I believe this issue is a bug, and not a general technical issue, question or feature requests that can be discussed on the forum.

Describe the bug
"delete from disk" action does not delete file from disk.

To Reproduce
select from playlist a son/file to be deleted
right click on it to bring contextual menu
select delete from disk

Expected behavior
delete file from disk

Screenshots:
If applicable, add screenshots to help explain your problem.

System Information:

  • Operating system: gentoo
  • Strawberry Version: strawberry-1.0.23
    Linux-6.7.4
  • dependency graph for media-sound/strawberry-1.0.23
  --  media-sound/strawberry-1.0.23  amd64 
   `--  dev-db/sqlite-3.44.2-r1  (dev-db/sqlite) amd64 
   `--  dev-libs/glib-2.78.3  (dev-libs/glib) amd64 
   `--  dev-libs/protobuf-21.12  (dev-libs/protobuf) amd64 
   `--  dev-qt/qtconcurrent-5.15.12  (dev-qt/qtconcurrent) amd64 
   `--  dev-qt/qtcore-5.15.12-r1  (dev-qt/qtcore) amd64 
   `--  dev-qt/qtdbus-5.15.12  (dev-qt/qtdbus) amd64 
   `--  dev-qt/qtgui-5.15.12  (dev-qt/qtgui) amd64 
   `--  dev-qt/qtnetwork-5.15.12-r1  (dev-qt/qtnetwork) amd64  [ssl]
   `--  dev-qt/qtsql-5.15.12  (dev-qt/qtsql) amd64  [sqlite]
   `--  dev-qt/qtwidgets-5.15.12  (dev-qt/qtwidgets) amd64 
   `--  dev-qt/qtx11extras-5.15.12  (dev-qt/qtx11extras) amd64 
   `--  media-libs/alsa-lib-1.2.10-r2  (media-libs/alsa-lib) amd64 
   `--  media-libs/taglib-1.13.1  (media-libs/taglib) amd64 
   `--  x11-libs/libX11-1.8.7  (x11-libs/libX11) amd64 
   `--  dev-libs/libcdio-2.1.0-r1  (dev-libs/libcdio) amd64 
   `--  media-libs/chromaprint-1.5.1-r3  (media-libs/chromaprint) amd64 
   `--  media-libs/gstreamer-1.20.6  (media-libs/gstreamer) amd64 
   `--  media-libs/gst-plugins-base-1.20.6  (media-libs/gst-plugins-base) amd64 
   `--  dev-libs/icu-74.2  (dev-libs/icu) amd64 
   `--  media-libs/libgpod-0.8.3-r6  (media-libs/libgpod) amd64 
   `--  sci-libs/fftw-3.3.10  (sci-libs/fftw) amd64 
   `--  media-libs/libmtp-1.1.21  (media-libs/libmtp) amd64 
   `--  media-libs/libpulse-16.1-r2  (media-libs/libpulse) amd64 
   `--  media-video/vlc-3.0.20-r3  (media-video/vlc) amd64 
   `--  dev-cpp/gtest-1.13.0  (dev-cpp/gtest) amd64 
   `--  dev-libs/boost-1.84.0-r3  (dev-libs/boost) amd64 
   `--  dev-qt/qttest-5.15.12  (dev-qt/qttest) amd64 
   `--  media-plugins/gst-plugins-meta-1.20.6  (media-plugins/gst-plugins-meta) amd64 
   `--  media-plugins/gst-plugins-soup-1.20.6  (media-plugins/gst-plugins-soup) amd64 
   `--  media-plugins/gst-plugins-taglib-1.20.6  (media-plugins/gst-plugins-taglib) amd64 
   `--  gnome-base/gvfs-1.52.1  (gnome-base/gvfs) amd64  [mtp]
   `--  sys-fs/udisks-2.10.1  (sys-fs/udisks) ~amd64 
   `--  dev-qt/linguist-tools-5.15.12  (dev-qt/linguist-tools) amd64 
   `--  sys-devel/gettext-0.22.4  (sys-devel/gettext) amd64 
   `--  virtual/pkgconfig-2-r1  (virtual/pkgconfig) amd64 
   `--  app-alternatives/ninja-1  (app-alternatives/ninja) amd64 
   `--  dev-build/cmake-3.27.9  (>=dev-build/cmake-3.20.5) amd64 
[ media-sound/strawberry-1.0.23 stats: packages (38), max depth (1) ]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.27.9::gentoo
dev-build/libtool:         2.4.7-r1::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.0-r2::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust-bin:         1.74.1::gentoo
sys-apps/baselayout:       2.14-r2::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r10::gentoo

Additional context
this is odd
-used to works on same computer and setup
-doesn't work wither the file is in library or not.
-even after reindexing the whole library

it is build without KDSingleApplication

@jmsalvat jmsalvat changed the title delete from disk" action does not delete file from disk "delete from disk" action does not delete file from disk Feb 14, 2024
@jmsalvat
Copy link
Author

same if build with KDSingleApplication
by the way what is KDSingleApplication for?

same for strawberry-1.0.22 qt5
strawberry-1.0.23 qt6 and KDSingleApplication
strawberry-1.0.23 qt5

@jmsalvat
Copy link
Author

actually delete from disk does delete file only when file is playing.
this is odd
I expect it to delete any file
playing or not ,
in database or not
when file is in playlist...
Am I wrong to assume this?

@jonaski
Copy link
Member

jonaski commented Feb 14, 2024

actually delete from disk does delete file only when file is playing. this is odd I expect it to delete any file playing or not , in database or not when file is in playlist... Am I wrong to assume this?

This does not make sense. The delete feature works fine here. This is most likely a system related issue, not a bug in strawberry. Check file permissions, etc.
When deleting files in strawberry, it uses the trash, if the trash on the system is not working or is disabled it might cause an issue.

@jmsalvat
Copy link
Author

jmsalvat commented Feb 14, 2024

This does not make sense.

agreed

The delete feature works fine here

on my laptop it does work fine too
on the desktop it used to work fine.. not anymore

file permissions ok
inode ok
trash ok
no problemes on os/DE(KDE5)

could this be a database related problem?

ls -lah ~/.local/share/strawberry/strawberry/strawberry.db
-rw-r--r-- 1 jms jms 11M 14 févr. 22:04 /home/jms/.local/share/strawberry/strawberry/strawberry.db
df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
devtmpfs            10M       0   10M   0% /dev
tmpfs               16G    6,4M   16G   1% /dev/shm
tmpfs               16G    1,7M   16G   1% /run
/dev/nvme0n1p4      44G     35G  7,7G  82% /
/dev/nvme0n1p5      44G     31G   12G  73% /usr
efivarfs           128K     16K  108K  13% /sys/firmware/efi/efivars
/dev/nvme0n1p6      40G     16G   22G  42% /opt
/dev/nvme0n1p7      68G     50G   15G  78% /home
/dev/sda2          876G    632G  200G  77% /home/data
/dev/sdb1          1,8T    1,3T  367G  79% /home/T2
tmps                16G       0   16G   0% /var/tmp/portage
tmps               4,0G    666M  3,4G  17% /tmp
tmpfs              3,2G     16K  3,2G   1% /run/user/1000
sqlite3 ~/.local/share/strawberry/strawberry/strawberry.db "pragma integrity_check"
ok

starting strawberry:

strawberry --verbose
14:41:31.415 INFO  main:180                         Strawberry 1.0.23 Qt "6.6.1"
14:41:31.416 INFO  main:181                         "Gentoo Linux 2.14 - (linux 6.7.4-gentoojms-0.7.38) [x86_64]"
14:41:31.490 INFO  main:47                          TagReader worker connecting to "/tmp/strawberry_974952684"
14:41:31.510 ERROR GlobalShortcutsBackendKDE:161    KGlobalAccel returned QList() when setting shortcut QList(QKeySequence("Media Next"))
14:41:31.511 ERROR GlobalShortcutsBackendKDE:161    KGlobalAccel returned QList() when setting shortcut QList(QKeySequence("Media Play"))
14:41:31.511 ERROR GlobalShortcutsBackendKDE:161    KGlobalAccel returned QList() when setting shortcut QList(QKeySequence("Media Previous"))
14:41:31.511 ERROR GlobalShortcutsBackendKDE:161    KGlobalAccel returned QList() when setting shortcut QList(QKeySequence("Media Stop"))
14:41:31.607 INFO  Player:954                       Registered URL handler for "subsonic"
14:41:31.610 INFO  Player:954                       Registered URL handler for "tidal"
14:41:31.617 INFO  Player:954                       Registered URL handler for "qobuz"

if I select a file from strawberry file browser, put it in the playlist then delete it
I got this

14:41:50.343 WARN  unknown                          QFSFileEngine::open: No file name specified 

@jmsalvat
Copy link
Author

This does not make sense. The delete feature works fine here. This is most likely a system related issue, not a bug in strawberry. Check file permissions, etc. When deleting files in strawberry, it uses the trash, if the trash on the system is not working or is disabled it might cause an issue.

Thanks for pointing me to the right direction.
I finally nailed it
the trash was the issue.

other than the /home/user ,
I had another mounted filesystem as root and a user directory with music files in it.
strawberry can not create .trash directory then can not use it then do not delete

solution:
do not have top mounted directory as root but as strawberry user
or create a trash directory with good permission for strawberry user at the root dir of the mounted filesytem

I was only checking the home/user trash forgot that trash could be created on others filesytem.

I am closing this bug

opening a new one about as I think in accordance to freedesktop trash spec strawberry should issue a warning in such case
#1384

@jmsalvat jmsalvat changed the title "delete from disk" action does not delete file from disk "delete from disk" action does not delete file from disk [solved] Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants