+ if (command == 'C' && inputdev[0] != '/') {
+ /* since we chdir into the directory we are comparing
+ * to, we must retain the full tape path */
+ char wd[MAXPATHLEN], fullpathinput[MAXPATHLEN];
+ if (!getcwd(wd, MAXPATHLEN))
+ err(1, "can't get current directory");
+ snprintf(fullpathinput, MAXPATHLEN, "%s/%s", wd, inputdev);
+ fullpathinput[MAXPATHLEN - 1] = '\0';
+printf("FULLPATH is %s\n", fullpathinput);
+ setinput(fullpathinput);
+ }
+ else
+ setinput(inputdev);