Project

General

Profile

Bug #11004

Files not moved to System Trash on Mac OSX

Added by Michael Kefeder almost 4 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Low
Assignee:
Category:
Lighttable
Target version:
Start date:
04/24/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.0.3
System:
Mac OS X
bitness:
64-bit
hardware architecture:
amd64/x86

Description

When trashing a file on osx, the files get moved to ~/.local/share/Trash which is the freedesktop default, fine for linux desktops - but not easily manageable for OSX users (hidden directory not accessible by a normal user using Finder). Result: the disk space can never be freed by joe average.

I have written quickhack where it moves the files correctly into osx trash (potentially even keeping the restore information, this is broken on apples end - for single files it works). Find the quickhack attached. I am willing to correctly implement this, but this means I need some guidance how you guys intend to manage multi platform code. For example right now I am using "#ifdef GDK_WINDOWING_QUARTZ" to use the osx trash function, but that is not really related to Quartz, also I added my function to osx/osx.c which appears to be for gui code only, deleting files is filemanagement not gui. I am guessing this is not what you want in the long run?

quickhack patch is against current master

I compiled using
./build.sh --prefix /usr/local --build-type Release

osx_trash_quickhack.patch (2.97 KB) osx_trash_quickhack.patch Michael Kefeder, 04/24/2016 10:54 AM

History

#1 Updated by Igor Kuzmin almost 4 years ago

  • % Done changed from 0 to 100
  • Assignee set to Igor Kuzmin
  • Status changed from New to Fixed

Thanks for the report and patch, I've committed fixed version, trash should work fine in next release, though OSX users will need to clean ~/.local/share/Trash manually if it got created and used.
"Put back" function doesn't work for me at all with this patch, I'm guessing it's an OSX bug which also depends on OS version (I'm running Yosemite).
And speaking of bugs - please report this to upstream (glib) - it's actually their job to implement this functionality, not DT's.

#2 Updated by Roman Lebedev over 3 years ago

  • Target version changed from Candidate for next minor release to 2.2.0

Also available in: Atom PDF

Go to top