Skip to content

Commit

Permalink
fix (dms): MAX_FILENAME_LENGTH proper comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed May 14, 2024
1 parent 4c825d9 commit 5fa981e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DIRAC/DataManagementSystem/Client/DataManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def putAndRegister(self, lfn, fileName, diracSE, guid=None, path=None, checksum=
'overwrite' removes file from the file catalogue and SE before attempting upload
"""

if len(os.path.basename(lfn)) >= MAX_FILENAME_LENGTH:
if len(os.path.basename(lfn)) > MAX_FILENAME_LENGTH:
return S_ERROR(errno.ENAMETOOLONG, f"maximum {MAX_FILENAME_LENGTH} characters allowed")

res = self.__hasAccess("addFile", lfn)
Expand Down

0 comments on commit 5fa981e

Please sign in to comment.