AaronV77 / Monday

Scripts that create aliases in order to be able to push and pull from a central storage server that you can have at home.
GNU General Public License v2.0
0 stars 0 forks source link

Naming Conflicts #24

Closed AaronV77 closed 5 years ago

AaronV77 commented 5 years ago

For both the pull and push scripts, there can not be anything on the server or client with the same name twice... And this is a problem for the following reason, say we have a directory called "example", there could be 20 or more other directories that have the same name because it being common. So my solution would be the following: when we do the find command, if there are more than one location that have the same name, then to print out in numbered order of all the locations. Then have the user select which location to replace with or to grab.

The problem is the following: most of the find commands are happening in the heredoc and the heredoc is captured in an output file for error collection and etc. So, the question is how to display that information and then to collect everything else.

AaronV77 commented 5 years ago

I just thought about when there is a massive number of other files or folders, I see this happening more for files than folders. If there is a ton of other files that have the other name then, before the script starts the workflow, it should see what directory is above the item. This could help cut down on the number of repeats and make sure that we are reseting the proper file / folder.

Then when on the server if there are a ton, then to replace the one that has the same parent directory as the incoming file / folder.

If there is still more than one file then ask the user what one they would like to replace.

AaronV77 commented 5 years ago

Should also check to make sure that the repeating names that are found are of the same type as well. So if I'm looking at an example directory, then all other names found should also be a directory.