Announcement

Collapse
No announcement yet.

Using the pre-commit hook to restrict the size of the submitted file failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I tryed it. Now it react in different way.
    The problem is filesize function returns 0 value. I guess It happens because the name contain spaces, and the function "SVNLOOK cat -t $TXN $REPOS $afile | wc -c" canīt get the file size if name contains spaces.
    If name does not contain spaces, it works.
    Thats the thing now...

    Comment


    • #17
      Here is the result of the script (I also tryed once to introduce " " to the name, as you can see. Also with single quotes).
      Also tryed with the different ways of get file size (commented in the script).
      Last edited by davidvazqueztds; 10-18-2019, 10:35 AM.

      Comment


      • #18
        filesize=$($SVNLOOK cat -t $TXN $REPOS $afile | wc -c)

        should be:

        filesize=$($SVNLOOK cat -t $TXN $REPOS "$afile" | wc -c)

        Those are double-quotes around the $afile without any white-space.

        Comment


        • #19
          Thank you very much! I should be care of that

          Comment

          Working...
          X