Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. --- a/src/bin/e_open.c
  2. +++ b/src/bin/e_open.c
  3. @@ -475,6 +475,19 @@ static const Ecore_Getopt options = {
  4. }
  5. };
  6.  
  7. +static Eina_Bool
  8. +_is_protocole(const char *path)
  9. +{
  10. + Eina_Bool nonlocal = EINA_FALSE;
  11. + if (strstr(path, ":"))
  12. + {
  13. + const char *p = path;
  14. + while (!nonlocal && (*p != '/' || p++))
  15. + nonlocal = (*p == ':');
  16. + }
  17. + return nonlocal;
  18. +}
  19. +
  20. E_API int
  21. main(int argc, char *argv[])
  22. {
  23. @@ -535,7 +548,7 @@ main(int argc, char *argv[])
  24. }
  25. }
  26. }
  27. - else if (strstr(argv[args], ":"))
  28. + else if (_is_protocole(argv[args]))
  29. cmds = protocol_open(argv[args]);
  30. else
  31. cmds = local_open(argv[args]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement