anchor.diff:        (setf i 0
               r j))))
   
  -;; TODO Make proper function for generating short names.
  -(defun create-file (host file cluster-n pathname-name pathname-type attributes)
  -  "Create file/directory"
  -  (let* ((name (concatenate 'string pathname-name "." pathname-type))
  -         (short-name (make-string 11 :initial-element #\Space))
  -         (name-length (length name))
  -         (start-offset (next-n-spaces file (if (> name-length 11)
  -                                               (1+ (ceiling (/ name-length 13)))
  -                                               1)))
  -         (end-offset (+ start-offset (* 32 (if (> name-length 11)
  -                                               (ceiling (/ name-length 13))
  -                                               0)))))
  +(defun make-short-name (pathname-name pathname-type file)
  +  (let ((short-name (make-string 11 :initial-element #\Space)))
       (loop :for char-n :from 0 :to 7
             :for char :across pathname-name
             :do (setf (aref short-name char-n)
  
positive.code:             :do (setf (aref short-name char-n)
                        char)))
      ;; Check for short name collision
      (do-files (offset) file t
        (when (string= short-name (read-short-name file offset))
          (error "Short name ~A does alredy exist.~A~%Short name collision resolution not implemented" short-name)))
      (multiple-value-bind (time date) (get-fat32-time)
        (let ((cluster-number (next-free-cluster (fat host))))
          (flet ((set-short-name (name file start-offset cluster-number)
  
negative.code:                              ;; Write short name part
                               (multiple-value-bind (pathname-name pathname-type) (sub-path dest)
                                 (let* ((name (concatenate 'string pathname-name "." pathname-type))
                                        (short-name (make-short-name pathname-name pathname-type file))
                                        (name-length (length name))
                                        (start-offset (next-n-spaces dest-dir (if (> name-length 11)
                                                                                  (1+ (ceiling
  