Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 81 additions & 80 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
@@ -1,82 +1,83 @@
[
{
"caption": "Preferences",
"mnemonic": "n",
"id": "preferences",
"children":
[
{
"caption": "Package Settings",
"mnemonic": "P",
"id": "package-settings",
"children":
[
{
"caption": "Package Syncing",
"children":
[
{
"caption": "Settings – Default",
"command": "open_file", "args": { "file": "${packages}/Package Syncing/Package Syncing.sublime-settings" }
},
{
"caption": "Settings – User",
"command": "open_file", "args": { "file": "${packages}/User/Package Syncing.sublime-settings" }
}
]
}
]
}
]
},
{
"id": "tools",
"children":
[
{
"caption": "Packages",
"id": "packages",
"children":
[
{
"caption": "Package Syncing",
"children":
[
{
"caption": "Enable Syncing",
"command": "pkg_sync_enable"
},
{
"caption": "Disable Syncing",
"command": "pkg_sync_disable"
},
{ "caption": "-" },
{
"caption": "Define Sync Folder",
"command": "pkg_sync_folder"
},
{ "caption": "-" },
{
"caption": "Push Settings",
"command": "pkg_sync", "args": {"mode": ["push"]}
},
{
"caption": "Pull Settings",
"command": "pkg_sync", "args": {"mode": ["pull"]}
},
{ "caption": "-" },
{
"caption": "Settings – Default",
"command": "open_file", "args": { "file": "${packages}/Package Syncing/Package Syncing.sublime-settings" }
},
{
"caption": "Settings – User",
"command": "open_file", "args": { "file": "${packages}/User/Package Syncing.sublime-settings" }
}
]
}
]
}
]
}
{
"id": "tools",
"children":
[
{
"caption": "Packages",
"id": "packages",
"children":
[
{
"caption": "Package Syncing",
"children":
[
{
"caption": "Enable Syncing",
"command": "pkg_sync_enable"
},
{
"caption": "Disable Syncing",
"command": "pkg_sync_disable"
},
{ "caption": "-" },
{
"caption": "Define Sync Folder",
"command": "pkg_sync_folder"
},
{ "caption": "-" },
{
"caption": "Push Settings",
"command": "pkg_sync", "args": {"mode": ["push"]}
},
{
"caption": "Pull Settings",
"command": "pkg_sync", "args": {"mode": ["pull"]}
}
]
}
]
}
]
},
{
"caption": "Preferences",
"mnemonic": "n",
"id": "preferences",
"children":
[
{
"caption": "Package Settings",
"mnemonic": "P",
"id": "package-settings",
"children":
[
{
"caption": "Package Syncing",
"children":
[
{
"caption": "README",
"command": "open_file",
"args": {"file": "${packages}/Package Syncing/Readme.md"}
},
{
"caption": "-"
},
{
"caption": "Settings – Default",
"command": "open_file",
"args": { "file": "${packages}/Package Syncing/Package Syncing.sublime-settings" }
},
{
"caption": "Settings – User",
"command": "open_file",
"args": { "file": "${packages}/User/Package Syncing.sublime-settings" }
}
]
}
]
}
]
}
]
8 changes: 5 additions & 3 deletions package_syncing/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ def find_files(self, path):
[dir_names.remove(dir) for dir in dir_names if dir in dirs_to_ignore]

for file_name in file_names:
full_path = os.path.join(root, file_name)
rel_path = os.path.relpath(full_path, path)
file_name = file_name.lower() # We can't use fn as a key if Dropbox autoconverts it to lowercase on Windows!
full_path = os.path.join(root, file_name).lower()
rel_path = os.path.relpath(full_path, path).lower()

include_matches = [fnmatch.fnmatch(rel_path, p) for p in files_to_include]
ignore_matches = [fnmatch.fnmatch(rel_path, p) for p in files_to_ignore]
Expand Down Expand Up @@ -175,7 +176,8 @@ def pull(self, item):
last_remote_data = last_data.get("last_remote_data", {})

# Make target file path and directory
target = os.path.join(local_dir, item["key"])
target_fn = item["key"]
target = os.path.join(local_dir, target_fn)
target_dir = os.path.dirname(target)

# Skip if file was just pushed
Expand Down