]> arthur.barton.de Git - netatalk.git/commitdiff
uniconv: fix the fix, last commit wasn't great...
authorbfernhomberg <bfernhomberg>
Mon, 26 Apr 2004 14:05:26 +0000 (14:05 +0000)
committerbfernhomberg <bfernhomberg>
Mon, 26 Apr 2004 14:05:26 +0000 (14:05 +0000)
bin/uniconv/uniconv.c

index 8c3f1aff2d9b37df5c2f93e2aa7c217a0fc37e09..b2283cddec5208feff586fe9e7025db6fb2ecc66 100644 (file)
@@ -489,25 +489,19 @@ int main(int argc, char *argv[])
                cnid_type = DEFAULT_CNID_SCHEME;
        
 
-       /* check path */
+       /* get path */
        strlcpy(path, argv[optind], sizeof(path));
 
-       if (path[0] != '/') {
-               /* deal with relative path */   
-               if (chdir(path)) {
-                        fprintf (stderr, "ERROR: cannot chdir to '%s'\n", path);
-                        return (-1);
-               }
-               path[0] = 0;
+       /* deal with relative path */   
+       if (chdir(path)) {
+                fprintf (stderr, "ERROR: cannot chdir to '%s'\n", path);
+                return (-1);
        }
 
-       if (path[0] == 0) {
-               /* no path or relative path specified */
-                if (NULL == (getcwd(path, sizeof(path))) ) {
-                        fprintf (stderr, "ERROR: getcwd failed\n");
-                        return (-1);
-                }
-       } 
+        if (NULL == (getcwd(path, sizeof(path))) ) {
+                fprintf (stderr, "ERROR: getcwd failed\n");
+                return (-1);
+        }
 
        /* set charsets */
        atalk_register_charset(&charset_iso8859_adapted);