Naming issues in Check for Updates

0 views
Skip to first unread message

Mike Potjer

unread,
Jun 28, 2016, 2:18:51 PM6/28/16
to Thor, the Tool Manager for FoxPro
I was editing the .ApplicationName in the version text file for my Git Utilities, and ran into 2 different errors that occur in Check for Updates:

  1. If the .ApplicationName contains a character that is not valid for a folder name, such as a forward slash (/), CFU generates an error when attempting to create the temporary folder for downloading the tool.  ISTM that this could be easily fixed by replacing invalid characters when generating the folder name, since the code already adds other text to the name when generating the folder name.
  2. If the .ApplicationName contains a dash (-), CFU generates a different error when it attempts to determine the version number of the update.  This is because it generates a version number string in a format resembling this: "ApplicationName - v1.2.3 - v1.2.3 - 20160628".  That string is then parsed for the version number, extracting the version number from between the dashes.  The problem is that the code assumes that dashes are assumed to only be used as separators, and it gets confused about where the version info is when the name includes one or more dashes.  This, too, should be simple to fix by using OCCURS() to check how many dashes exist in the string, and only extracting version information from between the last 3 dashes in the string.
These errors are easy to reproduce if you know how to setup a tool to be installed via CFU (which would be needed for testing anyway), but I can get the exact locations of these errors if necessary.  This isn't urgent, since I've already changed my tool name to accommodate this, but it would be nice if CFU could be more flexible.

Thanks,
Mike

Jim Nelson

unread,
Jun 28, 2016, 4:18:42 PM6/28/16
to FoxPr...@googlegroups.com
Mike --

I appreciate (as always) the thoughtfulness and detail of your messages.

If this particular issue arose at a different time in the life of Thor, I might well have been very interested in responding to your suggestions.  I say "might well have", because I learned that tinkering with CFU was quite dangerous -- if I ever released an update to it that contained a bug, I could not send out a correcting update!  (This did happen once, and I learned that I did not want to repeat it.)

Thus, since I have not updated the core of the update process for a long time (long enough to have forgotten all the intricate details), I think that the best I can do is recommend that anybody creating new Thor projects (you, mostly) know that .ApplicationName cannot contain any special characters.

Thanks again for your work.



--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Mike Potjer

unread,
Jun 28, 2016, 7:01:56 PM6/28/16
to FoxPr...@googlegroups.com

Thanks Jim. I figured it was at least worth mentioning.

Mike Potjer

You received this message because you are subscribed to a topic in the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/FoxProThor/SVCmp4DHQYg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to FoxProThor+...@googlegroups.com.

Koen Piller

unread,
Jun 29, 2016, 3:12:59 AM6/29/16
to FoxPr...@googlegroups.com
Hi,
It may sound silly, but where stands CFU for?
Regards
Koen
--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Verzonden vanaf mijn iPhone

Koen Piller

unread,
Jun 29, 2016, 3:22:49 AM6/29/16
to FoxPr...@googlegroups.com
CFU = Check For Updates ofcourse!
Koen

Jim

unread,
Jun 29, 2016, 7:34:15 AM6/29/16
to FoxPr...@googlegroups.com
CFU = Check For Updates

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages