Raymond Toy pushed to branch issue-266-b-tilde-pathname-support at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/filesys.lisp
    ... ... @@ -313,9 +313,6 @@
    313 313
                path))))
    
    314 314
     
    
    315 315
     (defun replace-tilde-user (str start end)
    
    316
    -  #+nil
    
    317
    -  (return-from replace-tilde-user
    
    318
    -    (values str start end))
    
    319 316
       ;; Quick exit if STR doesn't start with ~ or we have an empty string.
    
    320 317
       (when (or (= start end)
    
    321 318
                 (char/= (schar str start) #\~))
    
    ... ... @@ -323,18 +320,14 @@
    323 320
           (values str start end)))
    
    324 321
       
    
    325 322
       (let ((end-user (position #\/ str :start start :end end)))
    
    326
    -    #+nil
    
    327
    -    (format t "user ~D:~D: ~A~%" (1+ start) end-user (subseq str (1+ start) end-user))
    
    328 323
         ;; Quick exit if we can't find a "/" to terminate the user name.
    
    329 324
         (unless end-user
    
    330 325
           (return-from replace-tilde-user
    
    331 326
             (values str start end)))
    
    332 327
         (let* ((user-name (subseq str (1+ start) end-user))
    
    333 328
                (homedir (user-homedir-namestring user-name)))
    
    334
    -      #+nil
    
    335
    -      (format t "user-name: ~S; homedir: ~S~%"
    
    336
    -              user-name homedir)
    
    337
    -      ;; Replace the ~user part with the home directory, adjusting END because of the replacement.
    
    329
    +      ;; Replace the ~user part with the home directory, adjusting END
    
    330
    +      ;; because of the replacement.
    
    338 331
           (values (concatenate 'simple-base-string
    
    339 332
                                (subseq str 0 start)
    
    340 333
                                homedir
    
    ... ... @@ -351,8 +344,6 @@
    351 344
       ;; home directory
    
    352 345
       (multiple-value-bind (namestr start end)
    
    353 346
           (replace-tilde-user namestr start end)
    
    354
    -    #+nil
    
    355
    -    (format t "~S: ~D ~D~%" namestr start end)
    
    356 347
         (multiple-value-bind
    
    357 348
               (absolute pieces)
    
    358 349
             (split-at-slashes namestr start end)