-
Dimitris Aragiorgis authored
A combination of kamaki and Pithos UI usage can lead to a Pithos state that is inconsistent and does not match ordinary directory structures. Specifically, if we have a file under .\dir1\dir2\dir3 and we upload dir1 recursively from a windows machine, pithos objects will look like this: D dir1/ 10B dir1/dir2/dir3/file D dir1\dir2 D dir1\dir2\dir3 If we traverse the above file structure from Pithos UI two additional files will be created: 0B dir1/dir2 0B dir1/dir2/dir3 The above is a buggy behavior. This patch introduces the 'kamaki scripts verifyfs' command. It fixes the above structure in the following manner: a) --fix-conflicts will prepare the directory structure to become consistent by renaming the conflicting objects via adding a special suffix to them (e.g "_orig_2015-01-02"). Conflicting objects are objects that already exist in Pithos as file objects but they should be directory objects instead. b) --fix-dir-names will rename all existing directory objects that contain backslashes in their names, replacing '\' with '/'. c) --fix-missing-dirs will create missing intermediate directory objects. The --yes option will bypass prompting the end user. Signed-off-by: Dimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
4b609746