Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem finding files on the local filesystem #12

Open
ccarouge opened this issue Jan 16, 2019 · 3 comments
Open

Problem finding files on the local filesystem #12

ccarouge opened this issue Jan 16, 2019 · 3 comments
Assignees

Comments

@ccarouge
Copy link
Member

I'm running with these options:
mdssdiff -v -r -cr -p mxs561/LIS-WRF .

And I get this type of output:

Walking remote directory mxs561/LIS-WRF/./my_run/WRF_output/extracted_data/scripts_EH/Mean_2000
Directory my_run/WRF_output/extracted_data/scripts_EH/Mean_2000 not found locally, adding files
Walking remote directory mxs561/LIS-WRF/./my_run/WRF_output/extracted_data/scripts_EH/Mean_2001
Directory my_run/WRF_output/extracted_data/scripts_EH/Mean_2001 not found locally, adding files

These directories and their content are definitely on the local filesystem so I'm not sure what is going on. As far as I can tell, both remote and local directories are the same with the same content (same files and file sizes)

@ccarouge ccarouge self-assigned this Jan 16, 2019
@ccarouge
Copy link
Member Author

ccarouge commented Jan 16, 2019

@aidan I think I know what is going on. When walking the local filesystem, I've got this message:

Walking local directory ./my_run/WRF_output/extracted_data/scripts_EH/Mean_2001_2010

and this on remote:

Directory my_run/WRF_output/extracted_data/scripts_EH/Mean_2001 not found locally

See how one starts with ./ and not the other?

@ccarouge
Copy link
Member Author

Might need to do a ldirectory = os.path.relpath(dname,"./") to get the name of the local directory without the ./ Or just visited.add(dname[2:]) to remove the ./ which seems to always be there in walk() output.

@aidanheerdegen
Copy link
Member

The problem doesn't occur if the command is formulated like so:

mdssdiff -v -r -cr -p mxs561 LIS-WRF

Either this use case should be supported (by called os.path.normpath to remove the leading ./, or it should be explicitly flagged to the user that this doesn't work, and abort the program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants