Skip to content

Commit

Permalink
Fix XROOTStorage: putFile puts files in wrong place on EOS
Browse files Browse the repository at this point in the history
In some cases the Path checked here already starts with //, so this check would
fail and the rootdir would be prepended again.  This results in files ending up
in the wrong place.
  • Loading branch information
andresailer committed Dec 10, 2014
1 parent 350df52 commit f4155b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/Storage/XROOTStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ def getProtocolPfn( self, pfnDict, withPort ):
pfnDict['Protocol'] = self.protocol
pfnDict['Host'] = self.host

if not pfnDict['Path'].startswith( self.rootdir ):
if not (pfnDict['Path'].startswith( self.rootdir ) or pfnDict['Path'].startswith( "/"+self.rootdir )):
pfnDict['Path'] = os.path.join( self.rootdir, pfnDict['Path'].strip( '/' ) )

# These lines should be checked
Expand Down

0 comments on commit f4155b5

Please sign in to comment.