audacity leaves empty /tmp/audacity-$USER directory behind

4 messages Options
Embed this post
Permalink
Benjamin Drung-2

audacity leaves empty /tmp/audacity-$USER directory behind

Reply Threaded More More options
Print post
Permalink
Hi,

please remove the empty /tmp/audacity-$USER directory on exit.

Initial bug report in Debian: http://bugs.debian.org/548722
When I open and close audacity, it leaves an empty /tmp/audacity-$USER
directory behind. Please fix it to delete the directory when the user
presses quit, or from the WM close button or from the signal handlers.

--
Benjamin Drung
Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org)


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Richard Ash (audacity-help)

Re: audacity leaves empty /tmp/audacity-$USER directory behind

Reply Threaded More More options
Print post
Permalink
On Sat, 2009-10-10 at 17:27 +0200, Benjamin Drung wrote:
> please remove the empty /tmp/audacity-$USER directory on exit.
>
> Initial bug report in Debian: http://bugs.debian.org/548722
> When I open and close audacity, it leaves an empty /tmp/audacity-$USER
> directory behind. Please fix it to delete the directory when the user
> presses quit, or from the WM close button or from the signal handlers.

That is the working directory for temporary files whilst audacity is
running. Whilst it should be empty on exit, if a crash or forced wuit
occurs, the files in that directory will be needed when audacity is
restarted in order to recover the user's work. So deleting the empty
directory is a bad idea:
* In the case where shutdown is orderly (via the quit menu item), then
there is only a single directory to remove
* In any other circumstance, then potentially important data will be in
the directory, and it must not be removed.

If you can provide a patch which deals with the first case without risk
to the second, then I'll apply it, but it's not a priority (think how
many other applications create temporary -$USER directories and don't
remove them on shut-down - I have kde, gconfd, hsperfdata, orbit and
acroread (the last uses numeric UID / GID) in /tmp). Provided they don't
grow out of control, there shouldn't be a problem. As a user I'd be much
more interested in cases where /tmp (or /var/run, /var/cache etc) is
emptied out and then applications refuse to start because their pet
directory doesn't exist (something that doesn't affect Audacity, but
seems to plague other programs).

Richard


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale (Audacity Team)

Re: audacity leaves empty /tmp/audacity-$USER directory behind

Reply Threaded More More options
Print post
Permalink
Richard Ash (audacity-help) wrote:
>> On Sat, 2009-10-10 at 17:27 +0200, Benjamin Drung wrote:
>> please remove the empty /tmp/audacity-$USER directory on exit.
>>
>> Initial bug report in Debian: http://bugs.debian.org/548722
>> When I open and close audacity, it leaves an empty /tmp/audacity-$USER
>> directory behind. Please fix it to delete the directory when the user
>> presses quit, or from the WM close button or from the signal handlers.
>
> That is the working directory for temporary files whilst audacity is
> running. Whilst it should be empty on exit, if a crash or forced wuit
> occurs, the files in that directory will be needed when audacity is
> restarted in order to recover the user's work. So deleting the empty
> directory is a bad idea:
> * In the case where shutdown is orderly (via the quit menu item), then
> there is only a single directory to remove
> * In any other circumstance, then potentially important data will be in
> the directory, and it must not be removed.
>
> If you can provide a patch which deals with the first case without risk
> to the second, then I'll apply it, but it's not a priority (think how
> many other applications create temporary -$USER directories and don't
> remove them on shut-down...

Is this patch going to be cross-platform? Otherwise it creates a behaviour mismatch with Windows at least, where the specified Audacity temp directory is also emptied on clean exit, but not removed.

Also is the patch going to delete the default Audacity temp dir or the user-specified one, which may be different? There may be a weak case for deleting the default temp dir on a clean exit of Audacity when the user has changed the default to some other location. Is that the user's issue?


Gale
 
Benjamin Drung-2

Re: audacity leaves empty /tmp/audacity-$USER directory behind

Reply Threaded More More options
Print post
Permalink
Am Samstag, den 10.10.2009, 11:35 -0700 schrieb Gale (Audacity Team):

> Richard Ash (audacity-help) wrote:
> >> On Sat, 2009-10-10 at 17:27 +0200, Benjamin Drung wrote:
> >> please remove the empty /tmp/audacity-$USER directory on exit.
> >>
> >> Initial bug report in Debian: http://bugs.debian.org/548722
> >> When I open and close audacity, it leaves an empty /tmp/audacity-$USER
> >> directory behind. Please fix it to delete the directory when the user
> >> presses quit, or from the WM close button or from the signal handlers.
> >
> > That is the working directory for temporary files whilst audacity is
> > running. Whilst it should be empty on exit, if a crash or forced wuit
> > occurs, the files in that directory will be needed when audacity is
> > restarted in order to recover the user's work. So deleting the empty
> > directory is a bad idea:
> > * In the case where shutdown is orderly (via the quit menu item), then
> > there is only a single directory to remove
> > * In any other circumstance, then potentially important data will be in
> > the directory, and it must not be removed.
> >
> > If you can provide a patch which deals with the first case without risk
> > to the second, then I'll apply it, but it's not a priority (think how
> > many other applications create temporary -$USER directories and don't
> > remove them on shut-down...
The precondition was shorten to one word in my request: empty. The
directory should not be removed if it is not empty.

Isn't fixing this a things of 5 minutes. After removing the temporary
files on exit the directory should checked if it is empty and then be
removed.
I can write a patch if no one else is willing to do this. But then I
need following information:
* Where are the temporary files removed?
* Is there a wx function for checking if a directory is empty?
* Is there a wx function for removing a directory?

> Is this patch going to be cross-platform? Otherwise it creates a behaviour
> mismatch with Windows at least, where the specified Audacity temp directory
> is also emptied on clean exit, but not removed.

Yes, it should be cross-platform.

> Also is the patch going to delete the default Audacity temp dir or the
> user-specified one, which may be different? There may be a weak case for
> deleting the default temp dir on a clean exit of Audacity when the user has
> changed the default to some other location. Is that the user's issue?

Good question. I would say yes, we should remove the directory in all
cases if it is empty.

--
Benjamin Drung
Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org)


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel

signature.asc (852 bytes) Download Attachment