Description of problem: ptrash stores user data in ~/.ptrash and should follow xdg base dir spec References: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html A non spec rationale http://ploum.net/207-modify-your-application-to-use-xdg-folders/
It might actually be better to follow xdg trash spec instead http://freedesktop.org/wiki/Specifications/trash-spec/
I have sent pull request to fix these issues in github repositoiry (https://github.com/pjps/ptrash).
Hello Adhokshaj, It is not a correct approach. You are trying to upgrade existing '.trashdb' implementation to support new trashinfo format. First, that'll break the existing implementation and secondly it is quite a messy thing to do. I'd suggest, create a new source file trashinfo.c and write functions which would read & write individual 'file-name.trashinfo' files under '../Trash/info/' directory, with appropriate information. Once done, link trashinfo.c at compile time and de-link ptrashdb.c. This way you have two 'clean' storage back-ends. You won't break ptrashdb.c functionality, which can be re-used with something else; Plus you'd have support for the new '.trashinfo' format. Hope it helps. -- * https://github.com/pjps/ptrash/pull/2#commitcomment-12078441
(In reply to pjp from comment #3) > Hello Adhokshaj, > > It is not a correct approach. You are trying to upgrade existing '.trashdb' > implementation to support new trashinfo format. First, that'll break the > existing implementation and secondly it is quite a messy thing to do. > > I'd suggest, create a new source file trashinfo.c and write functions which > would read & write individual 'file-name.trashinfo' files under > '../Trash/info/' directory, with appropriate information. Once done, link > trashinfo.c at compile time and de-link ptrashdb.c. > > This way you have two 'clean' storage back-ends. You won't break ptrashdb.c > functionality, which can be re-used with something else; Plus you'd have > support for the new '.trashinfo' format. > > Hope it helps. > -- > * https://github.com/pjps/ptrash/pull/2#commitcomment-12078441 Got that. Will do as per your suggestion.
Hello Adhokshaj, (In reply to Adhokshaj Mishra from comment #4) > Got that. Will do as per your suggestion. Did you have chance to work further on it? (just checking) Thank you.
Hi, Did you have chance to work on it?
This is addressed in commit -> https://github.com/pjps/ptrash/commit/4201c001f7a088ef4825dcd7fe26aee2792 It's work in progress and needs all the testing possible.
ptrash-1.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f9b0865170
ptrash-1.1-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-ddd5fedbb6
ptrash-1.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d398e2fb8
ptrash-1.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a551b1a275
ptrash-1.1-1.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-04b08e857c
ptrash-1.1-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a551b1a275
ptrash-1.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d398e2fb8
ptrash-1.1-1.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-04b08e857c
ptrash-1.1-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-ddd5fedbb6
ptrash-1.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f9b0865170
This is fixed.