Index: uspace/app/bdsh/cmds/modules/touch/touch.c
===================================================================
--- uspace/app/bdsh/cmds/modules/touch/touch.c	(revision 8d2dd7f2d52fbc7693f94b66e451eeff3756d061)
+++ uspace/app/bdsh/cmds/modules/touch/touch.c	(revision 9246016f2cd9a449613c5c8a7e45dcdc5c78a8f5)
@@ -123,5 +123,8 @@
 		if ((!no_create) ||
 		    ((no_create) && (vfs_stat_path(buff, &file_stat) == EOK))) {
-			fd = vfs_lookup(buff, WALK_REGULAR | WALK_MAY_CREATE);
+			int rc = vfs_lookup(buff, WALK_REGULAR | WALK_MAY_CREATE, &fd);
+			if (rc != EOK) {
+				fd = -1;
+			}
 		}
 		
