[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Dopendir for /host on aranym



Hello,

I've discovered that Dopendir for a path with trailing path-separator does not work for /host.

This is the reason why qed cannot open the clipboard if one uses /host/clipbrd as clipboard. If Dopendir in MiNT strips the trailing path-separator qed works with /host/clipbrd.

All other filesystems seem to be able to handle this. Should MiNT be patched? I don't think it could break anything, the changed path is only used for path2cookie.

+ /* if the filesystem won't accept a trailing pathsep, try again without */
+ if(r)
+ {
+   long l = strlen(name)-1;
+   char c = name[l];
+   if( c == '/' || c == '\\' )
+   {
+     char *temp = kmalloc(l+1);
+     if( temp )
+     {
+       strncpy(temp, name, l);
+       temp[l] = 0;
+       DEBUG(("Dopendir'%s' try: '%s'", name, temp));
+       r = path2cookie (p, temp, follow_links, &dir);
+       kfree(temp);
+     }
+   }
+ }


--
Helmut Karlowski