=== rmw ChangeLog ===

2022-01-25

  * rmw v0.8.1 released

2022-01-24

  * the curses menu library is now much more likely to be found on *BSD
  systems

  * bugfix: when attempting to restore a file from a waste folder
  listed in the config file that has a trailing slash, rmw will no
  longer report that the file is not in a waste folder.

2022-01-07

  - curses is no longer a requirement (configure -Dwithout-curses=true)

2021-12-30

  - removed '-e' command line option ('--empty' option not affected)

2021-06-28

  * rmw v0.8.0 released

2021-06-21

  * Replaced autotools build system with meson

2021-06-04

  * rmw now uses the canfigger library for parsing the configuration file.

2021-05-23

  * The config option 'purge_after' has been deprecated and replaced
  with 'expire_age' ('purge_after' will still be accepted, but the user
  will be given a deprecation warning).

  * Expanded the man page and updated the README (improved documentation)

  * disabled a restore test that failed when 'make check' is run with
  superuser privileges

2021-05-13

  * The environmental variable RMWTEST_HOME has been replaced with
  RMW_FAKE_HOME (Trying to use RMWTEST_HOME will give a deprecation
  warning and still work).

2021-05-12

  * When '-u' is used, the mrl file will no longer be removed, but
  emptied instead. If a user gives the '-u' option when the mrl file is
  empty, they will get a friendlier message stating that there are no
  items in the list (instead of an error message about the file not
  being found).

  * bugfix: fixed handling of dot dirs ('.' and '..'). Instead of
  giving an error message and quitting, rmw will print a message
  stating that they'll be skipped.

2021-05-06

  * rmw v0.7.09 released

2021-05-05

  * bugfix: filenames now display correctly when using '-vvg' (#308)

2021-04-29

  * rmw v0.7.08 released

2021-04-28

  * bugfix: fixes test failing on osx using xcode 11.5 and above (#283)

2021-04-26

  * rmw v0.7.07 released

2021-04-25

  * bugfix: list output (rmw -lv) shows all removable devices as
  attached even for those that are detached.

2021-04-23

  * (for testing) Replace RMWTRASH(=fake-year) with RMW_FAKE_YEAR(=true)

2021-04-08

  * bugfix: When restoring files from removable media or devices, rmw
  will now process relative paths (this primarily affects users who
  trash a file with the "move to trash" option from their desktop, and
  then later try to restore with rmw. See
  https://github.com/theimpossibleastronaut/rmw/issues/299 for more
  information).

  * Removed deprecated config option (purgeDays)

  * Minor updates to tests infrastructure


2021-03-01

  * rmw v0.7.06 released

2021-02-25

  * When using -s,--select, the number of lines the terminal has will
  be checked. The number of items in the list will be based on that; if
  it doesn't meet the minumum requirement, rmw will exit.

2021-02-23

  * Allow optional argument to -g/--purge that can override the value of
  'purge_after' in the configuration file (-g[N_DAYS], --purge[=N_DAYS]).

2020-11-30

  * bugfix: restore broken symbolic links instead of giving a "file not
  found" message (issue #292)

2020-11-29

  * Improved handling of file with leading hyphens
  * When an invalid option is given, usage output no longer displays

2020-11-26

  * You can view how many days remain until a file is purged by using
  -vv (with -fg).

2020-08-22

  * If lstat() encounters and error, also display the filename/directory it
  was attempting to access.

2020-06-29

  * add '-m, --most-recent-list' option: list most recently rmw'ed files

2020-06-16

  * rmw v0.7.05 released

  * rmw will now refuse to move a waste folder or a file that resides
  within a waste folder (This feature was in place before, but at some
  point Andy accidentally removed the code).

2020-06-07

  * Feature removed: restore with '-z' using only the basename from any
  directory. User must be in a Trash directory or specify the full path
  (e.g. rmw -z ~/.local/share/Trash/foo.bar). For details, see issue
  #272.

2020-05-28

  * Fixed broken purge test

2020-05-18

  * Fix for compiling with gcc 10 (Thanks to muralikodali and GazL)

2019-11-27

  * Added '-R' option, changed '--recurse' option to '--recursive',
  added recursive (rm compatibility) options in --help output, fixed
  message shown when using '-r, --recursive'

2019-08-12

  * rmw v0.7.04 has been released.

  * The config file is now read from $XDG_CONFIG_HOME/rmwrc or
  ~/.config/rmwrc.

  * `lastpurge` is now 'purge-time' and stored in $XDG_DATA_HOME/rmw or
  ~/.local/share/rmw.

  * `lastrmw` is now 'mrl' and stored in $XDG_DATA_HOME/rmw or
  ~/.local/share/rmw.

  * The default Waste folder (specified in the configuration file) is now
  ~/.local/share/Waste instead of ~/trash.rmw.

  * The ~/.config/rmw directory is no longer used. It can be deleted,
  but you may first want to copy your old configuration file to the new
  location.


2019-08-06

  * To get user's home dir, revert back to retrieving via environmental
  variable (conforms to FreeDesktop Trash Spec).

  * on DragonFlyBSD, it's no longer required to use `env
  MENU_LIBS=-lmenu` when running configure
  <https://gitlab.com/andy5995/rmw/issues/220>

2019-08-06

  * rmw v0.7.03 has been released.

2019-07-30

  * rmw now gets the user's HOMEDIR from a passwd struct (see
  <https://linux.die.net/man/3/getpwnam>), not from the environmental
  variable.

  * A waste folder can now use the $UID (user id) variable.
  <https://github.com/theimpossibleastronaut/rmw/issues/134>

2019-07-21

  * Because rmw automatically creates a config file in the user's home
  directory, rmw no longer searches in /etc (or /usr/local/etc..) for
  rmwrc. It can be removed from your system if installed previously.

  * FEATURE-REMOVAL:-t,--translate option

2019-07-20

  * BUGFIX: (severity: low) Some calls to strncat() where an incorrect
  value was used, which could potentially cause a string to get
  truncated to an undesirable length
  <https://github.com/theimpossibleastronaut/rmw/issues/257>.

2019-07-16

  * The value written to the "lastpurge" file is no longer the day of
  the month, but the time since the Epoch (00:00:00 UTC, January 1,
  1970), measured in seconds (see ticket #238 for more info).

2019-07-09

  * release version 0.7.02

2019-07-03

  * Feature change: Emptying the waste folders is now done with the
  -e,--empty option

  * [#241](https://github.com/theimpossibleastronaut/rmw/issues/241)The
  translated man pages have been removed.

2019-06-27

  * BUGFIX:
  [#235](https://github.com/theimpossibleastronaut/rmw/issues/235)on
  some systems, purge would fail to run when requested, 'make check'
  failed. This was reported to happen on Manjaro and Arch.

2019-06-21

  * BUGFIX:
  [#233](https://github.com/theimpossibleastronaut/rmw/issues/233)missing
  output when purge is attempted without force

  * The configuration option 'force_not_required' has been replaced
  with 'force_required'

  * purge can run without -f/--force by default; however, you can still use
  "force_required" if you'd rather require '-f' to allow purge.

2019-06-13

  * On OpenBSD, setting MENU_LIBS when running configure is no longer
  required. Thanks to
  [@Jammyjamjamman](https://github.com/Jammyjamjamman) for encouraging
  me to do this and for helping to test.

2019-05-04

  * 'Make distcheck' fixed.

  * Dummy test files (test/somefiles) are now created when 'make check'
  is run, and not included with the distribution.

2018-12-14

  * Using "make check" from the build directory will execute the test
  scripts now. "make test-all, test-basic, etc" have been deprecated.

2018-12-12

  * When Restore() is called from main(), rmw will leave a return
  code equal to the number of errors returned by Restore() (if any).

2018-12-08

  * Implemented unit testing (though I've only created one unit test and
  no docs for unit testing yet)

2018-12-05

  * release version 0.7.01

2018-12-02

* Added --enable-debug option to `configure`.

2018-11-28

* Bugfix: "In some cases, not all files are displayed when using '-s'"
  <https://github.com/theimpossibleastronaut/rmw/issues/205>
  Enabled "wide-character" support by linking against ncursesw and
  menuw (instead of curses and menu). Some users may need to install
  libcursesw5-dev (or similarly named package) for the build to work.
  Thanks to Norm for giving me the solution.


2018-11-16

* Bugfix: On OpenBSD rmw would segfault 80% of the time.
https://github.com/theimpossibleastronaut/rmw/commit/7117c4f7761b7a5ba670e48260d0fcddb3908c35

Thanks to GazL for pointing the problem out to me.

2018-11-11

* rmw will warn the user about invalid or unknown options if it finds any
  in the config file (instead of just ignoring it).

2018-11-06

* If there is no default configuration file present, one will be
  written to $HOME/.config/rmw/config when rmw is first run.

* If verbosity is on, rmw will tell the user which config file is being used

2018-11-04

* When running purge, rmw will now show the total number of files and
  directories deleted, as well as the amount of bytes that were freed.

2018-10-30

* `rmw -s` now returns a sorted list of files

2018-10-26

* PROTECT feature removed

2018-10-24

* released rmw v0.4.05

2018-10-22

* tests for the Restore feature have been added.
* The configuration file (rmwrc) is no longer installed when `make
  install` is run.

2018-10-21

* test scripts are now run using 'make test-...' from the test directory

2018-10-11

* fr_FR translation added


2018-10-02

* de_DE translation added

2018-02-13

    libtool removed from configure

    Translations added:
      es_AR
      es_ES
      pt_BR

2018-01-14

    [#162] es_MX (Spanish Mexican) translation added /thanks @marioecg

2018-01-07

    Added test script (test/purging.sh)

2018-01-03

    [#133] Improve handling of plural forms (for translations);
    introduce the use of ngettext

    Added test script (test/basic.sh)

2018-01-01

    Ukrainian (uk) translation added /thanks @Svitlana Galianova

2017-12-31

    Russian (ru) translation added /thanks @Svitlana Galianova

2017-12-27

    rmw-0.4.03 released

2017-12-26

    [#140] Bugfix: rmw will now create the files/ and info/ directories
    without displaying an error message. This happened if there was only
    one WASTE folder in the config file, and if the files/ and info/
    hadn't been created yet.

2017-12-25

    Portuguese (pt_PT) translation added / thanks @jmrodriguesgoncalves


2017-12-20

    rmw-0.4.01 released

2017-12-15

    Polish and Nepali translations added. Thanks @suve and @ramdahal

    Nepali man page added.

2017-12-08

    Finnish translation added / thanks @sapake


2017-12-07

    The log entry from 2017-12-06 is now obsolete. If purge_after is > 0, rmw
    will only  show the message "purge has been skipped: use -f or --force"
    once a day, regardless of verbosity level. This still improves the behavior
    where that message would display every time if --force wasn't used (or if
    "force_not_required" was used in the config file).

2017-12-06

    rmw will now only show the message "purge has been skipped: use -f or
    --force" if verbose mode is on.

2017-12-02

    [#125] Implemented ncurses for --select feature.

2017-11-30

    [#126] using extra force at runtime (-ff) will now prevent messages
    such as "Directory not purged - still contains files" when purging
    directories that contain non-writable subdirectories.


2017-11-29

    new feature for testing added
      setting the RMWTRASH environmental variable to "fake-year" will write
      the year 1999 to the DeletionDate string in the .trashinfo file.

      Ex: `RMWTRASH=fake-year rmw some.txt temp.asc files.doc`

      Then run rmw with the purge option: `rmw -fg`

2017-11-26

    Martijn de Boer tested rmw on his MacOSX system today. To get a complete build,
    the only thing he needed was an additional line: '#include <locale.h>`.
    I've updated a couple spots on the rmw repo and wiki to indicate the rmw is
    a "Linux and MacOS utility".

2017-11-22

    -t --translate option added
        After translations are added, this option will display a translation
        of a default configuration file.

    strings prepared for translation, portable object template completed

2017-11-21

    Version number changed to 0.4.00

2017-11-17

    nl (Nederlands/Dutch) man page and po file added. Thanks @sexybiggetje

2017-11-14

    [#106] `make install` now installs the following man pages to the
    appropriate directories:

    * en
    * de
    * es
    * fi
    * pl
    * pt_BR

    Thank you for the tip, @suve.

2017-10-25

    [#68] File sizes now display when using '--select'

2017-10-15

    Man pages added!
    * Languages: EN, DE, FI, ES, PT, PL

    At this time, only the EN man page is installed. I don't know the
    proper way to install man pages in other languages.

2016-10-02

    Restore(): no longer takes type *char[] as an argument, only *char,
    which makes for much easier maintenance of code. Affected a few
    other functions as well (see diff if really curious).

2016-10-01

    Renamed mkinfo() to create_trashinfo()

2016-09-26

    No longer using var: waste_dirs_total & protected_dir_total.
        NULL is assigned as the last WASTE folder, so loops check for NULL
        to see when it's time to quit.

    undo_file (lastrmw) is now removed after -u is used (#58)

2016-09-25

    -p, --pause option removed

    -o, --orphaned option added
        create trashinfo files if no corresponding trashinfo is found (#16)

2016-09-18

    Issue #40 - To empty the trash, preface rmw on the command line
    with 'RMWTRASH=empty'. Example:
    RMWTRASH=empty rmw ....

    Fixed: #44 - Segfault if rmwrc isn't present in SYSCONFDIR

    Fixed: #45 - Restore fails if parent directory of target doesn't exist

2016-09-17

    enhancement: restoring files with only the basename #14

    url_escaping: #20 - escape Path key with URL (encoding) (Patched
    by Bruce Hernandez)
        Formerly this issue was about %20's not being converted to spaces.
    Bruce's patch makes things compliant with the freedesktop.org Trash
    specification:
    https://specifications.freedesktop.org/trash-spec/trashspec-latest.html


2016-09-16

    Fixed #27 - no info file found when restoring symlinks


2016-09-15

  Closed  #41 - add config option: force_not_required
  "force_not_required" in config file means -f or --force will not be
  required on the command line for purge to run.

    Completed - using removable media #12

2016-09-14

  Closed #33 - Requiring -f / --force as an option for purge to
  actually delete files (patched by Parth Suresh and Andy Alt)


2016-09-11

  Closed #30 - disable verbose mode by default (patched by Parth Suresh)
  Closed #29 - last entries in undofile get erased (patched by Bruce Hernandez)


2016-09-09

  Makefile.am : Thanks to parthsuresh - added 4 lines (#28) that will
  hopefully fix issue #21

  Added a function: open_err() : called if there is an error opening
  a file, displays a message.

2016-09-08

  Added a function: close_file(), so I don't have to worry about
  changing the way error messages are displayed.

2016-09-04

  * Issuing another release, due to issue #24

2016-09-03

  * Fixed: Warning about missing automake 1.14 #21

  * restore_rmw.c: I changed a lot of variable names, re-worked the
  function a little, and did a bit of cleaning.

  * Issuing an early release due to issue #21

-- Aug. 30 --

When building, rmw will now use the config.h that's generated by ./configure.

Added make_dir(), which creates directories when parents don't exist;
used it in several areas for code-cleanup (#18) and added related error
checking (#13).

Removed 2 functions: waste_check() and mkdirErr().

Added THANKS file.

-- Aug. 28 --

Added -std=gnu99 -Wall to the Makefile, cleaned up some warnings

Renamed purgeD() to is_time_to_purge()
Added some error checking to that function

Cleaned up get_config_data a little
Fixed the warning: /functions/config_rmw.c:252:7: warning: ‘cfgPtr’ may be used
 uninitialized in this function [-Wmaybe-uninitialized]
   if (fclose (cfgPtr) == EOF)

Development documentation updated


-- Aug. 24, 2016 --

Adding more error checks

Adding more comments

More (minor) code optimization

-- Aug. 23, 2016 --

Files below protected directories are now protected (not thoroughly tested yet)

I deleted 3 functions and moved their contents to main():
*remove_to_waste()
*pre_rmw_check()
*isProtected()

WASTE directories and the rmw data/config dir is protected by default;
no need to add a separate PROTECT entry to the rmw config file

'function_prototypes.h' renamed to 'primary_funcs.c'

-- Aug. 22, 2016 --

Fine-tuning the error-checking.
https://github.com/andy5995/rmw/issues/13


-- Aug. 20, 2016 --

Added a bunch of error checking, mostly for things that rarely go wrong;
but now if they go wrong, the user (or me) will get to see an error number.

There is still a lot more error-checking that can be added.


-- Aug. 17, 2016 --

Documentation (README) updated and expanded, info added to --help option
(There is no 'man' page yet.

Fixed -B bug (https://github.com/andy5995/rmw/issues/9)

-- Aug. 16, 2016

Added a lot more error-checking to rmdir_recursive() (basically I re-wrote
most of the function).

The most annoying problem I've had with rmw over the last few years is
if there are non-writeable files in a directory that is getting purged.
I'd always get the message "unknown error while removing..." Now it's more
specific.

RMDIR_MAX_DEPTH now used. rmdir_recursive() won't go deeper than the
number set in the header file (normally set to 32)

PROTECT= option implemented, but hasn't gone through very much testing yet.
It seems to have a problem if rmw is started with
'HOME=. rmw'. The problem is that the correct realpath isn't returned, so
a match is never made, and therefore protection is ignored.


-- Aug. 11, 2016

Issue #5 implemented
https://github.com/andy5995/rmw/issues/5

Added some pointers, dispatched more globals


-- August 09, 2016

Trying to simplify things, I removed the --add-waste (a) option. I don't
think it adds much to ease-of-use and isn't worth maintaining the code.

-- August 08, 2016

rmw will now create the $HOME/.config dir if it doesn't exist (dev).

-- August 07, 2016

I've gotten rid of more global variables

the w_X paths are now in a structure


-- August 06, 2016 --

The potential mangling of the trash directory string when using "$HOME"
in the config file is now fixed!
https://github.com/andy5995/rmw/issues/2

Release issued.

-- August 05, 2016 --

Release issued.


-- August 04, 2016 --

The trash directory string issues seems to be fixed. I'm not sure why. I
moved some global variables into main() - maybe that helped. ;)

I moved some functions into the main() part of the code.

-- August 02, 2016 --

Addressed issues with how the code had been split, updated Makefile to reflect changes


June 12, 2013

Purge will no longer run if -z or -s option is
given at runtime.


May 7, 2013
Minor changes and code clean-up, committed to SVN
Thanks to ntubski and johnsfine at LQ

May 3, 2013
Changed $HOME/.crmw config directory to $HOME/.config/rmw

May 1, 2013
Fixed problem where rmw doesn't honor --sysconfdir
Switched version numbering system to YYYY.MM.DD.HH format

April 29, 2013
Bugfix: restoring more than 1020 files at a time would fail,
caused by too many open files at once. Added fclose(fp) to
line 353 of funcs.c in Restore Function.

May 03, 2012
Fixed segfault which ocurred if rmw was built on a 64-bit system

Apr 17, 2012

Fixed segfault after 'file not found' (from trying to close an unopened
file)


Apr 12, 2012

Fixed broken Restore function
Eliminated list-remove function


Apr 10, 2012

My good friend Bob died today. Goodbye Bob, and may you find more
peace in death than you found in life. Congratulations on your newfound
relaxation method.

Apr 11, 2012

+Option --warranty and --version

Apr 6, 2012

Eliminated DEPTH_MAX for rmdir_recursive(), function works but doesn't
protect against possible infinite recursion

Symlink restoration fixed?

Apr 5, 2012

Changes to select_restore() so backspace will give user opportunity to
change entry (noted in TODO)


Apr 4, 2012

Refurbished purge function


Apr 3, 2012

Path in info file now the real path without time string appended


Mar 29, 2012

Purging can be turned off by using 'purge_after=0' in configuration file
+option to add Waste directory from command line, -a, --add-waste[parent].dir


Mar 27, 2012

Now storing files (lastpurge and undo_file) in DATADIR ($HOME/.crmw)
config file renamed and moved to $HOME/.crmw/config

+option to bypass protected directories, -B, --bypass


Mar 26, 2012

+option to delete files which are listed in a text file, -L --list-remove

Fixed a few recently created major bugs.

Mar 25, 2012

+Upon restore, time string will be added if a duplicate filename exists
at destination

+option to undo last ReMove, -u, --undo-last

+more error checking

+to get configuration data, rmw will read /etc/rmwrc if $HOME/.rmwc
isn't found

+more buffer overrun protection

Mar 23, 2012

+ --select will allow user to select a file to restore

Mar 21, 2012
+--list waste[parent].dir folders cmd line option
+some buffer overflow protection, still needs more
+specify alternate configuration file at command line (-c)

Mar 20, 2012

DEPTH_MAX definition added to avoid unlimited recursions in rmdir_recursive()

Mar 17, 2012

Support for files larger than 2G enabled in rmw.c
Protection of Waste folders now enabled
'$HOME' or '~' can be used in config file
rmw.c split into main.c, funcs02.c, funcs.c, rmw.c and moved to src/

Mar 13, 2012

Restore function has been restored and rewritten
Now only purges files once day.

Mar 12, 2012

Added support for short and long options

Mar 11, 2012
Added some error-checking
stat now determines which filesystem the file is on

March 9, 2012

Added rmdir_recursive function for use with the purge function

March 9, 2012
DeletedDate= string in info files now uses the same format as Desktop
Trash

Added line [Trash Info] to top of info file
Changed default extension of info files from .rmw to .trashinfo

March 7, 2012
0.01.9pre

Added purge function
Added remove to waste[parent].dir function
Many other minor changes

0.01.6pre
March 24, 2011

1. Added support to ReMove files to Desktop Trash (~/.local/share/Trash...)

0.01.5pre
March 22, 2011

1. Added support for restoring files by base name or by wildcards (-z)
2. Can now read Waste directory from config file
3. Creates <Waste/files> and <Waste/info> if they don't exist
4. Added duplication protection
