Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
/ afp-fapfap Public archive

Apple File Protocol Filenames and Pathnames Fix and Preserve

Notifications You must be signed in to change notification settings

aogier/afp-fapfap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

AFP FAP FAP

last: 20160518

AFP FAP FAP (Apple File Protocol Filenames and Pathnames Fix and Preserve) is a mass renamer for the mess the switch AFP -> SMB left on our fileservers.

It will be a tool we will use to cleanup some problem/oddities that currently block people's work.

Please note that while we release this you can always access fileserver via FTP:// and fix things by yourself at [redacted].

Which problems are addressed

As Apple unilaterally dropped AFP support from their operating system, a switch from AFP:// based file sharing to SMB://became more and more urgent and we finally made that campus-wide on April 11 2016.
Unfortunately, as soon as lot of you started to use the new SMB:// protocol, strange things began to happen, mainly:

  • permission-related issues when navigating files
  • empty folder that you know aren't empty

Causes

Since none of those errors is really true server side (eg. we didn't loose any of your data, we didn't loose control on permission flows), we took some time to analyze the situation in order to collect a matrix of causes for those issues.

What we have found is a few things we have to fix with stored data. Some problems are machine generated (metadata, system files), others are user-made poor choices (slashes in file names, multiple files w/ same name and different amount of trailing spaces ...)

Here is the matrix:

Problem Operating System CAUSES WILL BE
OSX Windows DELETED RENAMED
single file disappeared

(10.10)
  • trailing space in name "file "
  • "slash" in name "file:2efname"
  • "dot" in name "file:2ename"

see the file, cannot open

(10.8)

  • trailing space in name "file "
  • "slash" in name "file:2efname"
  • "dot" in name "file:2ename"

single folder disappeared

(10.10)
  • trailing space in name "folder "
  • "slash" in name "file:2efname"
  • "dot" in name "file:2ename"

see the folder, cannot open

  • trailing space in name "folder "
  • "slash" in name "file:2efname"
  • "dot" in name "file:2ename"

folder is empty

(10.8)
  • trailing space in name "folder "
  • "slash" in name "file:2efname"
  • "dot" in name "file:2ename"

cannot remove empty folder

  • :2eDS_Store

Please note that there will probably be other oddities we have't tracked so far so this list will be updated (check date under title)

Cleaning actions

Following cleaning actions will be taken:

  • trailing, leading spaces => removed, 'file ' will become 'file'
  • slash in filename => become underscore, 'file/name' will become 'file_name'
  • trailing, leading dot => become a real dot, ':2efile' will become '.file'
  • :2eDS_Store files => DELETED (because useless ATM)

About

Apple File Protocol Filenames and Pathnames Fix and Preserve

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages