[Bug 530268] Re: MOVE_SELF handling renames the directory incorrectly
Launchpad Bug Tracker
530268 at bugs.launchpad.net
Thu Apr 22 19:29:46 BST 2010
This bug was fixed in the package pyinotify - 0.8.9-1ubuntu2
pyinotify (0.8.9-1ubuntu2) lucid; urgency=low
* Cherry picked patch from upstream to fix overlapping when renaming
path in MOVE_SELF (LP: #530268)
-- Facundo Batista <facundo at canonical.com> Wed, 3 Mar 2010 17:49:22 -0300
** Changed in: pyinotify (Ubuntu)
Status: Confirmed => Fix Released
MOVE_SELF handling renames the directory incorrectly
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.
Status in “pyinotify” package in Ubuntu: Fix Released
I have a path fully watched. Rename one directory from "test_dir", to "test_dir_renamed" (note that they "overlap").
So, it gets into process_IN_MOVE_SELF(), and tries to fix the paths that it has in the watch managers.
In the loop where it checks which paths to choose, it gets: "tests/home_dir/root/test_dir_renamed".
The src_path is:
The dest_path is:
And the code *incorrectly* renames it to:
One way to avoid this overlapping issue is to add the "/" to the source_path, so you don't get in the trap of comparing with .startswith().
A patch is attached here that fixes the problem in the described way.
Date: Mon Mar 1 16:46:16 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: python-pyinotify 0.8.9-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
Uname: Linux 2.6.32-14-generic i686
More information about the Ubuntu-sponsors