Tookmund / Swapspace

A fork of Jeroen T. Vermeulen's excellent dynamic swap space manager
GNU General Public License v2.0
139 stars 13 forks source link

Fix setting of swappath_len in the presence of duplicate path separators #35

Closed rotdrop closed 2 years ago

rotdrop commented 2 years ago

In swaps.c getcwd(swappath) is called in order to normalize the path. This, however, may change the length of the swappath string and thus invalidates the previously computed swappath_len. The PR corrects this.

Tookmund commented 2 years ago

Thanks for the fix!